I have a column called group_id as 1,4 in database..
While showing in grid it will show as aaa,bbb by on_data_display function
while searching in filter as "aaa" it works
filter as bbb it doesn't work.
next value after , doesn't work.
You can make dropdown in search autofilter, which shows aaa,bbb etc and search 1-4 values in db.
$col["stype"] = "select";
$col["searchoptions"] = array("value" => ":;1:aaa;2:bbb;3:ccc;4:ddd");
$cols = $col;
If you need open text field in search, you can use:
$col["dbname"] = "if(group_id='aaa',1, if(group_id='bbb',2, if(group_id='ccc',3,4)))";
This dbname field is replaced in WHERE clause for specified column search.
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!