I have a grid with 2 columns - one string and one checkbox (database integer type with values of 0 or 1).
Each column has an “attachHeader” filter set.
I want to be able to store the current filter values so as when the user navigates away from the page and then returns to the page (same session or a different session), I can then repopulate the filter, programmatically - in the onXLE event.
I can set/repopulate the filter value for the string column but I can’t determine how to set it for the checkbox column.
Code snippet below:
<rows>
<row id="1">
<cell>Role1</cell>
<cell>1</cell>
</row>
<row id="4">
<cell>Role2</cell>
<cell>1</cell>
</row>
<row id="41">
<cell>Role3</cell>
<cell>0</cell>
</row>
</rows>
. . .
myGrid = myLayout.cells("a").attachGrid();
myGrid.setImagePath("codebase/imgs/");
myGrid.setHeader("Role Str,Status Chkbox");
myGrid.setColumnIds("xrole,xstat");
myGrid.setInitWidths("100,100");
myGrid.setColAlign("left,center");
myGrid.setColTypes("ed,ch");
myGrid.setColSorting("str,str");
myGrid.enableMultiselect(false);
myGrid.attachHeader("#text_filter,#combo_filter");
// dropdown for the combo_filter
cbbStatus = myGrid.getCombo(1);
cbbStatus.put("0","No");
cbbStatus.put("1","Yes");
myGrid.init();
myGrid.attachEvent("onXLE",function(){
// Once the data is loaded, set the filter value for the 1st column,
myGrid.getFilterElement(0).value="Emplo";
// BUT how to set the filter for the checkbox column??
});
myGrid.load("getData.php?uid="+(new Date()).valueOf());
. . .