This is a migrated thread and some comments may be shown as answers.

Reloading grid takes nearly 2x as long as initializing the grid

2 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 14 May 2012, 10:35 PM
Hello,

I have a very complex grid that takes a few seconds to load.  It's tied to a local data source, and when I refresh the grid, it's taking more than 3x as long as the initial grid load takes.

One thing I've noticed is that when the grid is refreshed, the dataBound event handler is called twice, as demonstrated here:  http://jsfiddle.net/boblauer/YZcYC/.  Even if the dataBound event handler wasn't being fired twice, that still wouldn't account for the 3x slowness that I'm experiencing on refresh.  Is it possible other events are also being fired twice?

The code I'm using in my project to refresh the grid is the same that I'm using in that fiddle.  Is there a better way to do this?

Thanks,
Bob

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 15 May 2012, 08:56 AM
Hi Bob,

You do not need to manually call Grid's refresh method as the widget will be automatically repopulated then the DataSource's data is changed. Also this manual refresh is the cause for multiple dataBound event triggering as the Grid widget is rendered twice in a row.

Greetings,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bob
Top achievements
Rank 1
answered on 15 May 2012, 03:01 PM
I should have realized that.  Thanks for the help!
Tags
Grid
Asked by
Bob
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Bob
Top achievements
Rank 1
Share this question
or