Hi all,
issue about developer version.
I cannot get that 'select widget' works like select2.
comparing inspected code with phpgrid_demo site reveal that my site dont load select2 features ( neither class="select2….." )
only css rules–> .ui-jqgrid-view select
(select2 css and js path files are right and loaded)
Thanks in advance.
Hello,
The '$col["editoptions"]["dataInit"]' line is the main code to load select2 control in edit mode (as done in demos).
Make sure you have similar config in your code.
$col = array();
$col["title"] = "Client";
$col["name"] = "client_id";
$col["edittype"] = "select"; // render as select
$str = $g->get_dropdown_values("select distinct client_id as k, name as v from clients");
$col["editoptions"] = array("value"=>":;".$str);
…..
$col["editoptions"]["dataInit"] = "function(){ setTimeout(function(){ $('select[name=client_id]').select2({width:'80%', height:'20px', dropdownCssClass: 'ui-widget ui-jqdialog'}); },200); }";
…..
$cols[] = $col;
Hi Abu.
When I type the code as you write here Dropdown Select2 works OK.
When I insert a row : $col["editoptions"]["onload"]["sql"]= "select kkk as k …",
I see only normal Dropdown.
How can I update the content Dropdown Select2?
Thanks
Lubos