jQWidgets Forums

jQuery UI Widgets Forums Grid adding many rows to grid is slow

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • adding many rows to grid is slow #74073

    MrWinky
    Participant

    When I initialize the grid – I wanted to add 5000 blank lines in the grid’s ready() function. I was using begin/resumeupdate as recommended but this is still very slow. Is there a faster way to add that many lines to the grid?

    $("#jqxGrid").jqxGrid('beginupdate', true);
    while (index++ < 5000){
        $("#jqxGrid").jqxGrid('addrow', null, {});
     }
    $("#jqxGrid").jqxGrid('resumeupdate');
    adding many rows to grid is slow #74075

    Peter Stoev
    Keymaster

    Hi MrWinky,

    5000 rows added through a For Loop with method call in each iteration will take time and it should take time because you update the underlying data and re-render the Grid 5000 times. It would be better if you call the method 1 time as shown in the documentation. For example http://jsfiddle.net/jqwidgets/6kffhn30/ – the sample shows how to add 5000 rows dynamically and it takes < 1 sec. Hope that such performance time is OK for you. 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.