Hello!
I’m using connector_select_filter, but data presented in combo for selecion is completed out of sort. Can I sort it? How?
Elieser
Hello!
I’m using connector_select_filter, but data presented in combo for selecion is completed out of sort. Can I sort it? How?
Elieser
You can load option in #connector_select_filer using Options connector:
$filter1 = new OptionsConnector($res);
$filter1->render_sql("SELECT DISTINCT SUBSTR(item_nm,1,2) as value from grid50000","item_id","item_nm(value)");
$grid->set_options("item_nm",$filter1);
You can use render_sql method to sort options in necessary way
The best, two days of searching all over the internet, all over github and here is the solution… works perfectly for me
$filter1 = new OptionsConnector($res,$type_db);
$filter1->render_sql("SELECT DISTINCT GRUZ_NAME AS value FROM weighing WHERE GRUZ_NAME<>'' order by lower(GRUZ_NAME) asc","isn","GRUZ_NAME(value)");
$grid->set_options("GRUZ_NAME",$filter1);