Adding a search pane for a rowGrouped column

Adding a search pane for a rowGrouped column

pmconsultingpmconsulting Posts: 36Questions: 11Answers: 0

Link to test case: bongo.cc/spud/spud
Debugger code (debug.datatables.net): n/a
Error messages shown: none
Description of problem:
I'm using search panes together with rowGroup. If I add a pane for the column used for the rowGroup, clicking any of the terms in that pane shows zero results. I assume this is because rowGroup doesn't work with searchpanes.

My data is organized into groups but I would like to provide a way to show and hide each group. Is there a way to do this? Can I write a custom function for a custom pane that would achieve this?

Answers

  • kthorngrenkthorngren Posts: 21,374Questions: 26Answers: 4,957

    Currently you have this:

           searchPanes: {
                select: {
                        style: 'multi'
                    },
                layout: 'columns-3',
                columns: [6, 7, 9],
                dtOpts: {
                    scrollY: '300px'
                },
                cascadePanes: true
            },
            order: [
                [2, 'asc']
            ],
            rowGroup: {
                dataSrc: 19
            },
    

    Can you add column 19 so we can take a look at the issue?

    Also which column is column 19 - so we don't have to count :smile:

    Kevin

  • pmconsultingpmconsulting Posts: 36Questions: 11Answers: 0

    Sorry! Please check it now.

  • kthorngrenkthorngren Posts: 21,374Questions: 26Answers: 4,957

    This looks like an example of your category column:

    <td id='product_15'>Pre-filled Slant-Style Shippers (Season & Savor®)</td>

    Could be the &amp. See this recent thread about issues with ampersand and SearchPanes. Try the nightly version linked in the thread.

    Kevin

  • pmconsultingpmconsulting Posts: 36Questions: 11Answers: 0

    I've removed all of the ampresands and registration symbols from that column. The only remaining characters are parenthesis. But it still hides all rows when any terms under the rowGrouped pane are selected.

  • kthorngrenkthorngren Posts: 21,374Questions: 26Answers: 4,957

    You have this:

           columnDefs: [
    ....
                {
                    targets: [1, 2, 8],
                    visible: false,
                    searchable: false,
                }
            ],
    

    You added column 1 to the SearchPanes but you have searching disabled for that column.

    Kevin

  • pmconsultingpmconsulting Posts: 36Questions: 11Answers: 0

    I'm hiding column 1 because it's being used for rowGroups. I'm guessing that I can't use it as a searchPane unless its visible? If that's the issue, can I set it to 0 width, or something?

  • pmconsultingpmconsulting Posts: 36Questions: 11Answers: 0

    Yes - hiding the rowGroup column is the issue. Trying to adjust the width of that column as it's actually unnecessary when grouping and I'm tight on space.

  • kthorngrenkthorngren Posts: 21,374Questions: 26Answers: 4,957

    You can hide the column and have it searchable. The problem is this searchable: false,. You can do something like this:

           columnDefs: [
    ....
                {
                    targets: [1],
                    visible: false,
                },
                {
                    targets: [2, 8],
                    visible: false,
                    searchable: false,
                }
            ],
    

    Kevin

Sign In or Register to comment.