jQWidgets Forums

jQuery UI Widgets Forums Grid Data grid only loads data on setting source a second time?

This topic contains 1 reply, has 1 voice, and was last updated by  realtek 9 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • realtek
    Participant

    Hi,

    I have a jqxGrid assigned to a jqxDropdownButton and I am setting the source when the user clicks the dropdown, like this:

       $("DropdownField").on('open', function () {
            $("Grid").jqxGrid({ source: dataAdapter });
        });

    This just returns a spinning loading wheel.

    if you close the dropdown and re-open it, it then loads all the data.

    What could be causing it?

    Thanks


    realtek
    Participant

    I think I have fixed it although I am not sure if its the correct way.

    I think the issue was because the columns where also dynamically constructed using .push.

    So I have added this in bindingcomplete because I also wanted the columns request to occur when the dropdown is clicked:

    $(GridID).on(‘bindingcomplete’, function (event) {
    $(GridID).jqxGrid({ columns: sourceVirtualFieldGrid.columns });
    });

    It solved the issue.

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

You must be logged in to reply to this topic.