I'm trying to fill a ListGrid and my json comes from a string, so I can't use the DataSource setDataURL() function because I don't need to make an HTTP request--I already have the json in a string. It seems that a DataSource can't be passed json directly and has to go through an HTTP request instead. Is there a way around this? Basically, I'm trying to avoid creating individual ListGridRecords one by one and adding them to the ListGrid when I would rather pass the whole json to fill the grid at once.
Announcement
Collapse
No announcement yet.
X
-
I guess that was what I was trying to avoid. To use setData() on a ListGrid, I would have to create individual ListGridRecords over and over, put them in an array, and then call setData(). Is that the only way? I'm worried about the speed of doing that with large datasets. I'm looking for an alternative where I can just pass the entire grid contents as a json string all at once rather than creating individual ListGridRecords for each row.
I found something about calling setClientOnly(true) on a DataSource and then using test data from a json string which would work for me, but I don't see how to implement that exactly.
Comment
Comment