jQWidgets Forums

jQuery UI Widgets Forums Grid Load/unload/load again problems

This topic contains 4 replies, has 4 voices, and was last updated by  admin 4 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Load/unload/load again problems #15578

    jas-
    Member

    I am attempting to place a gridview element within a jQuery mobile collapsible container.

    I have added the following code to load & unload the jqWidget gridview element on expand & collapse. For brevity I options etc have been omitted.

    EDIT: Is there a better method (couldn’t find it in the API) for unloading the gridview object?

    EDIT: The complete error message…

    TypeError: f is null
    http://localhost:8080/MLIB-Inventory/js/jqWidgets/jqwidgets/jqxgrid.js
    Line 7

        $("#current-inventory").bind('collapse', function(event, ui) {
    $("#jqxgrid").html(false);
    });
    $("#current-inventory").bind('expand', function(event, ui) {
    /* loading data source etc */
    $("#jqxgrid").jqxGrid({
    /* options etc */
    });
    });

    It will load & unload without a problem, however if I try to reload or ‘expand’ the collapsible jQuery UI container triggering the grid to reload its data source etc I begin getting errors.

    I have tested this on Firefox 19.0a1 (2012-11-18) & Chrome 24.0.1312.70. Thanks in advance.

    Load/unload/load again problems #15596

    Peter Stoev
    Keymaster

    Hi jas-,

    $(“#jqxgrid”).html(false); will not unload the Grid. The ‘destroy’ the Grid, use its ‘destroy’ method. To dynamically append it, use the jQuery’s append method and then initialize it via the jqxGrid constructor.

    Best Wishes,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Load/unload/load again problems #15611

    jas-
    Member

    Hello Peter,

    Great, thanks for that. I have been scouring the API but overlooked this method.

    Load/unload/load again problems #112778

    debashish002
    Participant

    how to initialize grid again and again ?

    Load/unload/load again problems #112785

    admin
    Keymaster

    Hi debashish002,

    Which framework do you use? Javascript, Angular, Vue, React?

    Best regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.