jQWidgets Forums

jQuery UI Widgets Forums Grid Flickering when using grid virtualmode

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Flickering when using grid virtualmode #14441

    olejl77
    Member

    I am updating my grid every ~5sec with a json string. Everything is working OK. The JSON string is generated on the server and to allow paging on the server I enabled virtualmode. After enabling virtualmode, the grid is flickering every time I refresh.

    This is my code:

        var source =
    {
    datatype: "jsonp",
    datafields: [
    { name: 'Name' },
    { name: 'Value', type: 'number' }
    ],
    url: url,
    beforeprocessing: function (data) {
    source.totalrecords = data.totalResultsCount;
    },
    };
    var dataAdapter = new $.jqx.dataAdapter(source,
    {
    loadComplete: function () {
    var length = dataAdapter.records.length;
    },
    loadError: function (xhr, status, error) {
    console.log(xhr);
    console.log(status);
    console.log('Error loading "' + source.url + '" : ' + error);
    }
    });
    var rendergridrows = function (params) {
    return params.data;
    }
    $("#jqxgrid").jqxGrid(
    {
    width: '99.9%',
    source: dataAdapter,
    pageable: true,
    autoheight: true,
    autoshowloadelement: false,
    editable: true,
    pagesize: 20,
    enableanimations: true,
    virtualmode: true,
    rendergridrows: rendergridrows,
    ready: function()
    {
    $("#jqxgrid").jqxGrid('dataloadelement').hide();
    },
    columns: [
    { text: 'Name', datafield: 'Name', width: 350, editable: 0 },
    { text: 'Value', datafield: 'Value', width: 100}
    ]
    });

    Is there anyway to solve this problem?

    The refresh is done through calling this function every ~5sec:

        function update_data()
    {
    $('#jqxgrid').jqxGrid('updatebounddata');
    }
    Flickering when using grid virtualmode #14455

    Peter Stoev
    Keymaster

    Hi olejl77,

    As the data is reloaded every 5 seconds, there might be a slight delay until your data is loaded and the Grid is refreshed and re-rendered. We will not be able to help here.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.