开发者

Dojo DataGrid very slow

开发者 https://www.devze.com 2022-12-30 23:10 出处:网络
I have a DataGrid that reads from a XMLStore. There are about 2200 rows in the DataGrid. Every time I scroll the table, it takes a couple of seconds to show th开发者_JAVA技巧e data. It seems like only

I have a DataGrid that reads from a XMLStore. There are about 2200 rows in the DataGrid. Every time I scroll the table, it takes a couple of seconds to show th开发者_JAVA技巧e data. It seems like only a few rows (20-25) are retrieved at a time. Is there a way to retrieve all the rows at once?


You need to change the default value for rowsPerPage, which can be done both programmatically and via markup. See here for examples of each: http://www.sitepen.com/blog/2008/10/22/new-features-in-dojo-grid-12/

A word of caution, though: fetching 2200 rows of data at once time is likely not going to give you the performance you want. I'd suggest experimenting a bit with rowsPerPage values larger than the default of 25, but smaller than your entire recordset (100 seems like a good place to start), until you find a value you're happy with.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号