problem-with-filter-first-element

Questionsproblem-with-filter-first-element
Javier asked 2 years ago

Hi, this code doesn’t work for me. The filter doesn’t work for the first element.
I think the problem isn’t on code, I think is a configuration database or regional configurational server because if i use search debug the condition for first element is not correct (a “-” sign appears in front of the identifier value).

Example: “AND ( `cliente`.`id_estado` = ‘-1’ )” when the correct form would be “AND ( `cliente`.`id_estado` = ‘1’ ) “

For the rest of elements filter works correctly. ¿Anyone know what might be happening?

$col = array();     
$col["title"] = "Estado"; // caption of column, can use HTML tags too     
$col["name"] = "id_estado"; // grid column name, same as db field or alias from sql     
$col["dbname"] = "subasta_boe.id_estado_subasta";     
$col["width"] = "50"; // width on grid     
$col["editable"] = true;     
$str = $g->get_dropdown_values("select distinct id_estado_ as k, descripcion as v from estado order by id_estado");     
$col["edittype"] = "select";     
$col["editoptions"] = array("value"=>":;".$str);     
$col["stype"] = "select";     
$col["searchoptions"] = array("value" => $str, "separator" => ":", "delimiter" => ";");     
$col["searchoptions"]["sopt"] = array("eq");     
$cols[] = $col;
2 Answers
Abu Ghufran Staff answered 2 years ago

Hello,

The code seems fine. You can check browser – console – network tab for the ajax call that is sent when you do search and inspect the posted data to server if it contains the hyphen as well.

It may need debugging and can’t help beside providing some hints.

You can email me directly and tell me your working time and timezone so we can have a remote session.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Nino Valenti answered 1 year ago

Hello.

I have the same issue.

How did you solve it?

Abu Ghufran Staff replied 1 year ago

Please email me your code and screencast showing the issue.
You can contact on [email protected]

Your Answer

9 + 2 =

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?