jQuery UI Widgets Forums Grid Reload of grid

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 4 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Reload of grid #91198

    antrax13
    Participant

    Hi,
    I have a table where user can click and this will open popup with grid.

    It is working first time but when user close popup with grid and click on another table cell.

    Popup wont open because it is saying

    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.

    I though when user clicks on different cell, it will fire another request to get data with new parameter and refresh grid.

    What I am doing wrong?

    Here is my code

    $.fn.GetAnomalyGrid = function(sn){
                    var systemNumber = sn;
                    var anomalyDashboardSource =
                    {
                        datatype: "json",
                        datafields : [
                            { name: 'anomalyid'}
                        ],
                        url: 'controllers/dashboard_getAnomalies.php?systemnumber='+systemNumber,
                        method: 'GET',
                        cache: false,
                        async: true
                    };
                    var anomalyDashboardDataSource = new $.jqx.dataAdapter(anomalyDashboardSource);
    
                    $("#jqxGridRedAnomalies").jqxGrid({
                        width: '100%',
                        source: anomalyDashboardDataSource,                
                        pageable: true,
                        pagesize: 20,
                        pagesizeoptions: ['20','50','100'],
                        autoheight: true,
                        sortable: true,
                        altrows: true,
                        enabletooltips: true,
                        columnsresize: true,
                        columnsreorder: true,
                        showfilterrow: true,
                        filterable: true,
                        columns: [
                          { text: 'Anomaly ID',  datafield: 'anomalyid',  width:100, columntype: 'textbox'}
                        ]
                    });
                };
                    
                $(".redAnomalies").click(function(){
                    
                    //var color = 'Red';
                    var sn = $(this).attr('data-sn');
                    //var st = $(this).attr('data-st');
    
                    $.fn.GetAnomalyGrid(sn);
                    
                    $('#redAnomalies').modal('toggle');
                });
    • This topic was modified 4 years, 3 months ago by  antrax13.
    Reload of grid #91302

    Hristo
    Participant

    Hello antrax13,

    This error can be thrown when server-side processing is enabled and you are trying to initiate one operation (sorting/filtering) before another (sorting/filtering) has been completed.
    Also, I would like to ask you what try to achieve and especially with $(".redAnomalies").click(function(){ ... }?

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Reload of grid #91303

    antrax13
    Participant

    Hi thanks this is now solved and slighly updated.

    I was trying to get data again passing new parameter.

    Everything works now see updated code: http://www.jqwidgets.com/community/topic/cellclassname-refresh-color/

    Please see the link above now I have a problem with reloading colors.

    Because on document ready it will set the cellclassname color to yellow and when I reload grid it is still keeping yellow color however I am expecting red.

    So $(".redAnomalies").click(function(){ ... } suppose to reload data source but colors are not updated, just data.

    Reload of grid #91346

    Hristo
    Participant

    Hello antrax13,

    Can I understand, you resolved the issue? Because in the shared topic looks finally is resolved this issue.
    If you need additional help feel free to contact us.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.