jQWidgets Forums

jQuery UI Widgets Forums TreeGrid Reinit TreeGrid

This topic contains 7 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Reinit TreeGrid #62703

    Part13an
    Participant

    Hello,

    I just checked grid refreshing posts, but still have a question(problem).

    I need to totaly rebuild my treeGrid (new columns and new data).

    I created a grid and $(“#” + this.GridName).jqxTreeGrid(
    {
    source: dataAdapter,
    altRows: true,
    showHeader: true,
    ready: function () {
    },
    columns: columns,
    columnGroups: formatedSections
    });

    and it works. But when I got new grid format (new columns) I used the same initialization and got empty small table (without columns and empty rows).

    How can I reInit my treeGrid with a new columns?

    Reinit TreeGrid #62707

    Part13an
    Participant

    As i understand – Columns can’t be updated, any solution for full grid update ?

    Reinit TreeGrid #62715

    Part13an
    Participant

    Uf, found the solution. Sections initialization should be before columns initializations during reInit.

    $(“#” + this.GridName).jqxTreeGrid(
    {
    source: dataAdapter,
    altRows: true,
    showHeader: true,
    ready: function () {
    },
    columnGroups: formatedSections,
    columns: columns

    });

    works good

    Reinit TreeGrid #62716

    Peter Stoev
    Keymaster

    Hi Part13an,

    Actually, you are not doing re-init. You are setting all properties again. It would be cleaner and faster to simply remove and create it again.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Reinit TreeGrid #62753

    Part13an
    Participant

    Thanks, but how can I do it? Just remove html element or what?

    Reinit TreeGrid #62756

    Peter Stoev
    Keymaster

    Hi Part13an,

    I think that you can “destroy” the TreeGrid through its “destroy” method if you want re-init. Then append a new DIV tag and call its constructor.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Reinit TreeGrid #62764

    Part13an
    Participant

    Cool, thanks, where can i find description of “destroy” and similar methods?

    Reinit TreeGrid #62767

    Peter Stoev
    Keymaster

    On the Documentation page about the TreeGrid – http://www.jqwidgets.com/jquery-widgets-documentation/

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.