jQWidgets Forums
Forum Replies Created
-
Author
-
OK – 3rd Parameter.. duh. 2 other issues on Export, but will post separately – thanks!
Thanks Peter but the 2nd Parameter is the type (i.e., xls, html, etc) , yes? Is there a way to add the name also?
Thanks Peter – I’ve gone ahead and played with it a bit (turned out to be pretty easy – nice work in the API / Demos!). Dynamically saving / loading groups as separate array is no big deal; weird thing you obviously know about: the state at save shows the group array but does not save into the variable and/or load back. So just saves as separate array works (see sample Save / Load state demo mods for anyone else who might benefit)
var state = null;
var stategroups=[];$(“#saveState”).click(function () {
// save the current state of jqxGrid.
state = $(“#jqxgrid”).jqxGrid(‘savestate’);
for (var i = 0; i < state.groups.length; i++) {
stategroups.push(state.groups[i]);
}
})$("#loadState").click(function () {
// load the Grid's state.
if (state) {
$("#jqxgrid").jqxGrid('loadstate', state);
// Reset Groups Array
$("#jqxgrid").jqxGrid('groups').length = 0;
// Add/Push save groups into Grid
for (var i = 0; i < stategroups.length; i++) {
$("#jqxgrid").jqxGrid('groups').push(stategroups[i])
}
}
else {
$("#jqxgrid").jqxGrid('loadstate');
}
});Thanks to both of you for the replies. I’ve looked at the API – it *looks* like I can retrieve current group array (for save) as well add grouping (from saved data) using the groups array – is that correct?
As example, if I update the groups array after loading a GridState, will it update the UI with the new/changed group(s)? I know I could work up a test on this, but its so critical to our needs that its not worth doing if not possible.
Thanks again!
-
AuthorPosts