jQWidgets Forums

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Export Grid File Name Export Grid File Name #32006

    TMC
    Member

    OK – 3rd Parameter.. duh. 2 other issues on Export, but will post separately – thanks!

    in reply to: Export Grid File Name Export Grid File Name #32002

    TMC
    Member

    Thanks Peter but the 2nd Parameter is the type (i.e., xls, html, etc) , yes? Is there a way to add the name also?

    in reply to: Question(s) about Grid Question(s) about Grid #27219

    TMC
    Member

    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');
    }
    });

    in reply to: Question(s) about Grid Question(s) about Grid #27207

    TMC
    Member

    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!

Viewing 4 posts - 1 through 4 (of 4 total)