I am using multi-select with checkboxes, and also using the filter.
I have 14,000 rows in my table, and I need to select about 100 of them.
But I need to be able to filter in different ways, make selections, change filter, etc, and KEEP the selections I make.
Right now, if I make a selection, then type a filter, I lose the selections.
Afterwards I will POST the selected rows to a new PHP page.
Yes, it is supported. You need to enable persist settings options.
Refer demos/appearence/persist-settings.php
(I've emailed you link to download v1.5.2)
Hi Abu,
Thanks for your help. However, I can't get it working properly.
Here's what I did, using your example page:
1) modify the example persist-settings.php to include multiselect
2) check off id's 8,9,10
3) filter client "maria anders"
4) #9 shows still selected. Good.
5) remove filter "maria anders"
6) only #9 is selected – not 8,9,10 as earlier.
Thanks
Dennis
I've resolved this issue.
Please update the new link of 'jqgrid-state.js' in your code.
<script src="http://yourjavascript.com/1331549655/jqgrid-state.js" type="text/javascript"></script>
Live Demo is here:
http://www.phpgrid.org/demo/demos/misc/persist-settings.php
// Code //
$col = array();
$col["title"] = "Client";
$col["name"] = "client_id";
$col["dbname"] = "clients.client_id";
$col["width"] = "100";
$col["align"] = "left";
$col["search"] = true;
$col["editable"] = true;
$col["edittype"] = "select";
# fetch data from database, with alias k for key, v for value
# on change, update other dropdown
$str = $g->get_dropdown_values("select client_id as k, name as v from clients");
$col["editoptions"] = array(
"value"=>$str,
"onchange" => array("sql"=>"select id as k, note as v from invheader WHERE client_id = '{client_id}'",
"update_field" => "note" )
);
$col["formatter"] = "select"; // display label, not value
$col["stype"] = "select";
$col["searchoptions"] = array("value" => ":;".$str);
$cols[] = $col;
$col = array();
$col["title"] = "Invoices";
$col["name"] = "note";
$col["width"] = "100";
$col["search"] = true;
$col["editable"] = true;
$col["edittype"] = "select";
$str = $g->get_dropdown_values("select id as k, note as v from invheader");
$col["editoptions"] = array("value"=>$str);
$col["editoptions"]["onload"]["sql"] = "select id as k, note as v from invheader WHERE client_id = {client_id}";
$col["stype"] = "select";
$col["searchoptions"] = array("value" => ":;".$str);
$cols[] = $col;
// Code //
When I onchange not working, help fix problem
thanks