0

I am using jqgrid advanced search(Client side search). Is there a way how I can exclude few rows from searching. That is I want to display those rows irrespective of search criteria. I know that we can exclude column by giving search : false in the colmodel option. Please help.

1 Answer 1

0

I am not sure why you need such behavior. Nevertheless if you know which rows which you want exclude it means that you can formulate an additional searching filter which exclude unneeded rows. You can use onSearch callback of searching options to modify the filters property of postData before the filtering will be started.

See here an example of modification. You can add additional group to the filter (see the documentation) to implement filtering of the rows which you need to exclude.

8
  • Thanks Oleg. Perfect solution which I was looking for. My form has frozen rows which need to be displayed all the time. So this behaviuour is needed. Jan 18, 2013 at 5:02
  • I am trying to use multiplegroup: true in my page. My sample query looks like this : ((A = 11) OR B = 2). Although I have record for this condition, no data is returned. I could not figure out the problem. Please help. However everything works fine if I dont use multiplegroup. What is wrong. Jan 18, 2013 at 9:13
  • @user1986736: You should describe the problem in new question. You should post the code which you use and describe the test case which should one follow to reproduce the problem.
    – Oleg
    Jan 18, 2013 at 9:17
  • can you give me an example of how I can exclude the first row irrespective of search option? Jan 24, 2013 at 9:31
  • @user1986736: Searching filters are based not on the position of the row ("the first row"). It's based on the data. So you should specify the corresponding role based on the data which are in the first row only. I suppose that the origin of the problem is the way how you added the first row. It you added it as all other data and it contains not the real data then it's your error. If you fix the origin of your problem then the problem which you try to solve now will not exist at all.
    – Oleg
    Jan 24, 2013 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.