Luiz C.
Luiz C.

Reputation: 776

Dojo DataGrid very slow

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 the 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?

Upvotes: 2

Views: 2186

Answers (1)

Rylee Corradini
Rylee Corradini

Reputation: 743

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.

Upvotes: 5

Related Questions