Possibel to change the order of the search operands?

QuestionsPossibel to change the order of the search operands?
Nell asked 3 years ago

Hi, need to change the order of the search operands, is this possible? Ideally would like "contains" at the top of the list instead of "equal".

Thanks,

Nell

5 Answers
Abu Ghufran answered 3 years ago

Hello,

You can edit lib/inc/jqgrid_dist.php and search:

$this->options["search_options"]["sopt"] = array('eq','ne','lt','le',' …. );

and replace with:

$this->options["search_options"]["sopt"] = array('cn','eq','ne','lt','le',….);
(move 'cn' from last to first)

Nell answered 3 years ago

Thanks for reply. I do not have that line of code in my "jqgrid_dist.php" file. Version issue? Was purchased in 2012!

Abu Ghufran answered 3 years ago

You can try setting it in your grid code:

$opt["search_options"]["sopt"] = array('cn','eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','nc','nu','nn');
$g->set_options($opt);

Check for variable names as per your code.

Nell answered 3 years ago

Tried that but no joy. My variable names as yours (i.e. $g).

Abu Ghufran answered 3 years ago

Your version is quite old, i don't remember what is missing and probably this feature is not supported in it.
If you want to upgrade to latest, I am sending you upgrade link with pricing.

Your Answer

14 + 19 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?