Hallo,
i want to put both in one html-page. but after do so, the filterfields for drop-Downs where not being displayed an more.
files
https://gist.github.com/gerdhuber/e0886f5ef43dce8d81ade602ba9de2e1
THank you
Gerd
Hello,
Demo code: https://gist.github.com/20874faa3ed09986150501fb145e4705
Screenshot:
Hallo Abu,
thank you for the solution, its works fine, but please integrate a field like this example:
$col = array();
$col[“title”] = “Musikart”; // caption of column, can use HTML tags too
$col[“name”] = “dt_musikart_text”; // grid column name, same as db field or alias from sql
$col[“width”] = “70”; // width on grid
$col[“editable”] = false;
$col[“search”] = true;
$col[“dbname”] = “hhc_titel.fk_titel_musikart”;
# fetch data from database, with alias k for key, v for value
$client_lookup = $g->get_dropdown_values(“select distinct id_musikart as k, dt_musikart_text as v from hhc_musikart order by dt_musikart_sort”);
# these 3 lines will make dropdown in search autofilter
$col[“stype”] = “select”;
// blank row, then all db values – ; is record separator, : is key-value separator
$col[“searchoptions”] = array(“value” => “:;”.$client_lookup);
$cols[] = $col;
You don’t see any filter for this field, please try
gist:f51390b73e4c117dea15ca6376e33a27
I am using phpgrid\demos\search\autofilter from the demos folder.
Regards and thank you
Gerd
Your gist code is working as expected. Please share with screenshot explaining your issue.