jQuery UI Widgets Forums Grid Bindincomplete empty page

This topic contains 3 replies, has 2 voices, and was last updated by  Pietervk 8 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Bindincomplete empty page #91867

    Pietervk
    Participant

    It seems I have a weird timing issue in bindingcomplete:

    
       $('#jqxgrid').on("bindingcomplete", function (event) {
              LocalizeStatus();
        });
    

    LocalizeStatus() is just creating a localizationobj and than adding it:

    
      $("#jqxgrid").jqxGrid('localizestrings', localizationobj);
    

    This issue I get in the grid (in virtual mode), is when
    a) click to select a row
    b) go back one page

    When I do that, the page appears empty (full 10 row grid with titles, but no data). When I do the same, but move forward a page, everything is fine. When I remove LocalizeStatus(), everything is fine to.

    I added some code to create a HTMl table using $(“#jqxWidget”).html(html) to the dataAdapter loadComplete event, and it shows all data is loaded, also when the page appears empty.

    I did not have this when using the grid with virtualmode=false.

    Any ideas, suggestions?
    Don’t focus on LocalizeStatus, I did some other tests with code in the bindingcomplete event, and the same behavior is there with the other code, and LocalizeStatus commented out.

    Thanks Pieter

    Bindincomplete empty page #91918

    admin
    Keymaster

    Hi Pietervk,

    I do not think its the smartest move to call that within bindingcomplete when the Grid is in virtual mode because by doing that this function will be called all the time which will cause re-rendering.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Bindincomplete empty page #92180

    Pietervk
    Participant

    Thanks Peter,
    When I call this after initializing the grid, I get this error:
    jqxGrid: The data is still loading. When the data binding is completed, the Grid raises the ‘bindingcomplete’ event. Call this function in the ‘bindingcomplete’ event handler.

    So that is why I placed it in the bindingComplete handler. Do you have a suggestion where I can try to put it instead?

    Bindincomplete empty page #92181

    Pietervk
    Participant

    The point of my question however, was not the localize status. I also have some other code in the bindingcomplete event. If I either have LocalizeStatus(), or the other code, in the bindingcomplete event, I get the empty page. If I remove both, that does not happen.

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

You must be logged in to reply to this topic.