1

I'm very new to JQgrid. I have a requirement which i'm not able to solve. I'm using toolbar filer with searchonenter as true and data is local. The rquirement is if a user types 'apple banana' in the filter textbox of a column then the filter should fetch the rows with text as apple or banana. Can anyone please give an idea on how to implement this?

Thanks, suneel

2 Answers2

0

When you call the function to create the filtertoolbar, you have an option 'groupOp' which default is AND, you can change to OR as follow:

$('#jQGrid').jqGrid('filterToolbar', { groupOp: 'OR' });

Hope it make sense for you.

vcliment89
  • 75
  • 2
  • 14
  • Thanks for the response @vcliment89. But the groupOp property you have mentioned will be applied for conditions on two columns (I'm not sure if my understanding is correct). Let me make my requirement clear. Suppose there is only one column in a JQGrid 'Fruit Name'. And toolbar search is enabled for this. When a user types 'banana' it fetches the rows with fruit name as banana. what i want now is when a user types 'banana,apple' in the filter texbox i need the rows which contain banana and rows which conatin apple.Hope the requirement is clear now? Any Ideas on how to implement this? – user1195259 Feb 08 '12 at 04:50
  • @Oleg Can you please sugegst some ideas if possible? – user1195259 Feb 08 '12 at 05:57
0

I posted before the answer on the same question.

The problem is that not accepted and not voted answers will be practically never found by searching. It's the problem if one answers on the questions of persons having minimal reputation points. I strictly recommend all to read carefully the How do I ask questions here? in the FAQ.

I recommend you additionally to modify the title of your question so that one could understand more from the reading of the title.

Best wishes!

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Thanks @Oleg. This is what exactly I need. I'm into Jquery for the last 5 days and there is not a single day when i didn't take help from your posts. – user1195259 Feb 08 '12 at 12:04
  • @user1195259: You are welcome! I am glad to know that I my previous posts could help you too. – Oleg Feb 08 '12 at 12:10