PDA

View Full Version : How to refresh DataGrid displayed store data?



Jenya
23 Aug 2010, 1:04 AM
After I make some manipulations I extract needed model from the store of the DataGrid and change its data. I want the DataGrid to be updated.

Does anyone know how to do that?

sven
23 Aug 2010, 1:25 AM
You can simple call
grid.getStore().update(mymodel);

Jenya
25 Aug 2010, 1:00 AM
Works, but just for the info for other users:

Your model class might need to override equals method (comparing by id for instance) if as mymodel you pass another instance.

sven
25 Aug 2010, 1:05 AM
Yes sure, the models have to be equal somehow.