jQWidgets Forums

jQuery UI Widgets Forums Grid Uncaught Error: jqxGrid: The data is still loading. When the data binding is ..

Tagged: ,

This topic contains 10 replies, has 4 voices, and was last updated by  Peter Stoev 10 years, 3 months ago.

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

  • realtek
    Participant

    Hi,

    I seem to be getting this error also since upgrading to 3.2.2, does it sound like something is being called before the data is loading?

    I don’t understand why bindingcomplete would be called before the data is loaded?

    Uncaught 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.

    Thanks


    hopper
    Participant

    Hi,

    I created a new grid in a div where a grid still exists before and I had the same problem.
    The message disapeared when I removed the pagesizeoptions settings from the grid initialization. Independent of the setting make sense here (because pageable is not set) the error disapeared after removing it.

    
    $(localThis).jqxGrid(
                {
                    source: dataAdapter,
                    //width: '100%',
                    //autoheight: true,
                    height: '60%',
                    //pageable: true,
                    sortable: true,
                    //pagesizeoptions: ['10', '20', '30', '40', '50'],
                    columns: settings.columns,
                    selectionmode: 'multiplerowsadvanced',
                    theme: settings.theme
                });
    

    realtek
    Participant

    Hi,

    Thats perfect thank you!

    I did think it might of been the page options but not enough to try removing them!

    Thank you!


    realtek
    Participant

    Hi Sorry,

    In my case this didn’t actually resolve the issue, I thought it did but it came back.

    I have now located the issue and it seems to be SQL performance issues.

    The data was taking too long to be returned from the server. I have resolved it and its working fine again now.

    Thank you


    hopper
    Participant

    Hi,

    the error returned. I have the problem if I replace an loaded grid with another one.
    The way I take is to call the destroy function on the old grid and initialize the new one then.

    The error occurs even if binding is completed (I tested it).

    So I have no real idea what to do. I guess it is a problem in jqxGrid.

    The error is:

    Uncaught 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. 06e8f5a_jqxgrid.sort_12.js:7
    a.extend.sortby 06e8f5a_jqxgrid.sort_12.js:7
    a.extend.removesort 06e8f5a_jqxgrid.sort_12.js:7
    b.extend.propertyChangedHandler 06e8f5a_jqxgrid_8.js:7
    a.jqx.setvalueraiseevent 06e8f5a_jqxcore_1.js:7
    (anonymous function) 06e8f5a_jqxcore_1.js:7
    x.extend.each jquery-2.0.3.js:598
    a.jqx.set 06e8f5a_jqxcore_1.js:7
    a.jqx.jqxWidgetProxy 06e8f5a_jqxcore_1.js:7
    (anonymous function) 06e8f5a_jqxcore_1.js:7
    x.extend.each jquery-2.0.3.js:590
    x.fn.x.each jquery-2.0.3.js:237
    a.fn.(anonymous function) 06e8f5a_jqxcore_1.js:7
    $.fn.s7ExpedientList 06e8f5a_expedient_list_handler_23.js:45
    showExpedients 06e8f5a_company_tree_handler_24.js:60
    (anonymous function) 06e8f5a_company_tree_handler_24.js:49
    x.event.dispatch jquery-2.0.3.js:4676
    y.handle

    Peter Stoev
    Keymaster

    Hi guys,

    If you would like to report an issue, the correct way to do it is to share a sample and step by step instructions. For sharing sample, you may use http://jsfiddle.net/. Also note that you should set properties, call methods, etc. after the Binding is Completed i.e in the “bindingcomplete” handler or in the Grid’s “ready” callback. If you do it on a different place, then update your code.

    Test Example:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title id='Description'>This example illustrates the Grid filtering feature. Enter some data into the Filter Row.</title>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.filter.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.pager.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxpanel.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcalendar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxdatetimeinput.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script>
        <script type="text/javascript" src="../../jqwidgets/globalization/globalize.js"></script>
        <script type="text/javascript" src="../../scripts/demos.js"></script>
        <script type="text/javascript" src="generatedata.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                var data = generatedata(500);
                var source =
                {
                    localdata: data,
                    datafields:
                    [
                        { name: 'name', type: 'string' },
                        { name: 'productname', type: 'string' },
                        { name: 'available', type: 'bool' },
                        { name: 'date', type: 'date'},
                        { name: 'quantity', type: 'number' }
                    ],
                    datatype: "array"
                };
    
                var dataAdapter = new $.jqx.dataAdapter(source);
    
                $("#jqxgrid").jqxGrid(
                {
                    width: '100%',
                    height: '60%',
                    pageable: true,
                    sortable: true,
                    pagesizeoptions: ['10', '20', '30', '40', '50'],
                    source: dataAdapter,
                    showfilterrow: true,
                    filterable: true,
                    selectionmode: 'multiplecellsextended',
                    columns: [
                      { text: 'Name', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'starts_with', datafield: 'name', width: 215 },
                      {
                          text: 'Product', filtertype: 'checkedlist', datafield: 'productname', width: 220
                      },
                      { text: 'Available', datafield: 'available', columntype: 'checkbox', filtertype: 'bool', width: 67 },
                      { text: 'Ship Date', datafield: 'date', filtertype: 'date', width: 210, cellsalign: 'right', cellsformat: 'd' },
                      { text: 'Qty.', datafield: 'quantity', filtertype: 'number',  cellsalign: 'right' }
                    ]
                });
                $('#clearfilteringbutton').jqxButton({ height: 25});
                $('#clearfilteringbutton').click(function () {
                    $("#jqxgrid").jqxGrid('clearfilters');
                });
            });
        </script>
    </head>
    <body class='default'>
        <div id="jqxgrid">
        </div>
        <input style="margin-top: 10px;" value="Remove Filter" id="clearfilteringbutton" type="button" />
    </body>
    </html>
    

    Best Regards,
    Peter Stoev

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


    hopper
    Participant

    Hi Peter,

    thanks for the hint to jsFiddle. I tried to re-create the problem there and found out, that there was a bug in my implementation.
    I will keep track on this thread if the problem reoccurs.

    Regards

    Stephan


    jccompagnon
    Participant

    I was having the same problem as the OP.

    Basically trying to load a grid in the same div where a grid used to be fails.
    I did as the OP suggested and commented out //pagesizeoptions: [’30’, ’60’, ’90’],
    and it worked.

    Peter, why does it work when commenting out page options ??!?!?

    We understand that jsFile to replicate the bug, …. but that is very cumbersome to do considering we pull from databases, …
    Bottom line is you could try to replicate and ……
    I would also be willing to give you access to our web page (user and pass in PM) for you to see it but jsFile is gona be too much

    So what we do is we have a grid.
    Upon click of edit we open a JqxWindow which has a Grid2 in it
    the source is JSON and pulls record dynamically just from the id clicked in the first grid

    First time grid inside the JqxWindow loads
    2nd click does not load
    we tried destroy, …. nothing did it

    Commenting the page option however fixed the issue 😉

    do no time to document it BUT seems like there is a Bug 😉


    Peter Stoev
    Keymaster

    Hi jccompagnon,

    Sorry, i don’t understand neither your issue or what you’re writing about. I would suggest you to provide jsfiddle.net example which illustrates an issue with the current version of jQWidgets in order to help people in this Forum to look at it and find out whether this is a problem with jQWidgets code or a problem with yours.

    Best Regards,
    Peter Stoev

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


    jccompagnon
    Participant

    sorry I am not gona spend 3 hours creating a jsfile.

    it is simple.
    1 – you have a grid inside div id= grid1
    2 – upon click of row we open a jqxWindow
    3 – inside this window there is another grid with id=grid2
    4 – close the jqxWindow
    5 – click on another row (of grid 1)
    6 – jqxWindow opens again and loads a “New” grid inside the grid id=grid2

    you click on the row of grid 1 it opens a window with grid 2
    if you have pagesizeoptions: [’30’, ’60’, ’90’], as part of the grid definition it does not work

    I can’t do better than that.
    if you want to fix it you can try it


    Peter Stoev
    Keymaster

    Hi jccompagnon,

    How is your post related to this Forum topic? I don’t see any relation to it. If you set paging options, you should include paging modules and set the pageable property to true, too.

    Best Regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.