1

With TreeGrid enabled in jqGrid, how can one create a work-around or customize the jqGrid source code so that the filter toolbar works properly on the client side?

Out of the box, having TreeGrid enabled disables client-side filtering, paging, and client-side sorting. I was able to make simply adjustments to the jqGrid source code to solve the latter two issues.

Donald T
  • 10,234
  • 17
  • 63
  • 91
  • Do you have any progress in your tests? By the way it would be better to change in the title of the question jqGrid to TreeGrid or jqGrid TreeGrid, because "Enable client-side filtering in jqGrid" sounds unclear. Client-side filtering in the standard grid don't need be additionally enabled. – Oleg Mar 02 '12 at 09:21

1 Answers1

1

The main problem with filtering of tree grid is just it's not clear what should be displayed as the result of filtering. I try to explain it on an example. Let us we have a tree with

+root
    +testchild1
        test1
    +child2
        test2

and you filter for the word "test". What should be displayed? Should be displayed the tree below?

    +testchild1
        test1
        test2

or the original tree stay be unfiltered?

If you do know exactly want should be displayed in the grid after the filtering you can implement the hiding of the unneeded rows manually. You can use beforeSearch callback. You can modify the code from the answer for example.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798