problem in serach option

Questionsproblem in serach option
krishna asked 3 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 3 years ago

Hello,

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

11 + 1 =

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?