jQWidgets Forums

jQuery UI Widgets Forums Navigation Tree Changing / Updating Source – Flicker

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Changing / Updating Source – Flicker #10307

    ccc
    Member

    Is there a way to change / update the source of a tree on a timer and prevent the tree from flickering?

    Currently I’m doing it by changing the source, I have not found a way to just send an update in yet

    	        // Set up the timer
    var timer = $.timer(function()
    {
    //alert('This message was sent by a timer.');
    // Get Prepared Data
    var source = getJQXTreeData();
    // Create Data Adapter
    var dataAdapter = new $.jqx.dataAdapter(source);
    // Perform Data Binding
    dataAdapter.dataBind();
    // Get the Tree Items
    var records = dataAdapter.getRecordsHierarchy('id', 'parentid', 'items');
    // Update Tree
    $("#jqxTree").jqxTree({ source: records });
    });
    timer.set({ time : 5000, autostart : true });
    Changing / Updating Source – Flicker #10316

    Peter Stoev
    Keymaster

    Hi ccc,

    By changing the Tree’s Data Source, you actually recreate the Tree and fill it with new hierarchy of items, so there could be a slight delay that result in flickering, if you do it on a timer. We cannot help you to improve that because there will be always some delay during the Tree’s initialization.

    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.