Excel like filtering in jqgrid
Asked Answered
B

1

5

I am new to jquery and jqGrid. I am struggling with it.I need someone to help me in the JqGrid that I need a filtering headers in the jqGrid.I look for it when I found a demo done by Oleg. But I need checkbox when I select on checkbox search values have to to be filtered just like Excel Filtering.Please help me out someone.

Even I findout the implementation but that is not working to me.Please help me in it,as I need it badly.

Thanks in Advance

Barretter answered 13/10, 2012 at 3:59 Comment(0)
C
18

I don't like words like "Excel like filtering" because everybody interprets it in different way. So I have to answer in the way how I interpret it.

I think that you should use jQuery UI MultiSelect Widget written by Eric Hynds. I wrote some answers and demos before which shows how to use it.

The demo shows how to use jQuery UI MultiSelect Widget together with toolbar searching to implement "Excel like filtering".

enter image description here

By the way you can build the list of values displayed by the multiselect widget dynamically like the values of jQuery UI Autocomplete in the answer.

Another answers (this and this) with the corresponding demos (this and this) shows how to use the widget for editing.

UPDATED: The updated demo uses jqGrid 4.4.1, jQuery UI 1.8.24 and jQuery 1.8.2 and the current (version 1.13.6 from 29.09.2012) version of jQuery UI Multiselect downloaded from github.

UPDATED 2: The answer contains beforeClear callback of filterToolbar which is required in case of usage "Refresh" button. The answer contains the updated demo which uses jqGrid 4.6.0.

Carnivore answered 13/10, 2012 at 18:22 Comment(4)
@Barretter I posted the demo which is updated to the current version of jqgrid: see UPDATED part of my answer.Carnivore
@Mohammad: the demos from my answer contains full JavaScript code inside of HTML page. So you need just open the demo in any web browser. Then you can open context menu by clicking right mouse and you choose the item like "View page source".Carnivore
is this available to even jqgrid php?Klaraklarika
@HelloMan: You mean probably Guriddo Suito PHP? I don't use personally commercial products based on original pure JavaScript version of jqGrid. So it's difficult to say how you can do this, but I'm sure that if could be possible because it's based on the same JavaScript code. You will need to include your own code in somewhere in dataInit part.Carnivore

© 2022 - 2024 — McMap. All rights reserved.