problem in serach option

Questionsproblem in serach option
krishna asked 2 years ago

Hi abu

I store value in database Y,N
But in grid i Display Like Yes,No

Problem is :
When I search Yes It Shows Empty Row How i Rectify This problem

1 Answers
Abu Ghufran answered 2 years ago


There are 2 solutions.

1) use Blank/Yes/No dropdown for search filter.

$col["stype"] = "select";
$col["searchoptions"] = array("value" => ":;Y:Yes;N:No", "separator" => ":", "delimiter" => ";");

2) Change field on which search should be done. e.g.

$col["dbname"] = "IF(field1=='Y','Yes','No')";

This will be use in WHERE clause and give correct result.

Your Answer

2 + 15 =

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 / 5. Vote count:

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

Let us improve this post!