tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

Search filtering on grouped rows #926

Closed suleymanbalaban3 closed 4 years ago

suleymanbalaban3 commented 5 years ago

When I search with 'all' option works true. When I used other filter options('running', 'done') after I click 'all' options button but does not work, get rows as much as previously used option's row count.

I have never seen this error before. I already asked in StackOverflow but I didn't get an answer. Can you help me?

`var searchState = ':'+'ALL' +';'+'running'+':'+'RUNNING' +';'+'done'+':'+ 'DONE'

. . .

colModel:[ {name:'name', index:'name', sortable:true}, {name:'state', index:'state', sortable:true, stype:'select', searchoptions:{value:searchState} } ],

. . .

grouping:true, groupingView : { groupField : ['state'], groupColumnShow: false, groupDataSorted : true },`

tonytomov commented 5 years ago

Hello,

Can you please prepare a full demo with data? You can use jsfiddle for this purpose.

I not sure what is the problem. By the way which version of jqGrid is used - this is important

Thank you

suleymanbalaban3 commented 5 years ago

Hello,

I couldn't share real project because of the security sorry for that. But I want to make like this project. https://jsfiddle.net/ja2awqgL/26/

I am using jqGrid.4.7.0

Thank you so much for your help.

tonytomov commented 5 years ago

Hello,

Actually can you please post your grid setup only. It is very important to know what is your datatype (local or server side-json,xml)

suleymanbalaban3 commented 5 years ago

Hello,

url:'ajax.htm', datatype: "json", mtype: "POST",

so server side.

I am trying to use like this https://jsfiddle.net/ja2awqgL/26/ but never work like that. Using 'All' selection get previous selections's row count after using other selections. If I don't use grouping the rows at the same time, this bug doesn't appear.

Best Regards,

tonytomov commented 5 years ago

Hello,

The problem is that your search is server side you you must perform a server side code to do what you want.

The example you post has a local data type and this work by default in jqGrid

With other simple words if you have server side data you must make side logic for this purpose.