PDA

View Full Version : Grid Toolbar is not refreshing after clearing



nitinfuture
2 Aug 2010, 8:52 AM
Hi,
I have a Grid in which I am using scroll paging and a Toolbar for displaying the current rows. I am using LiveView as view of Grid. I have two buttons one for loading the store into the grid from database and one button for clearing the view. I am not getting any problem while loading the grid but while clearing it is not refreshing the Toolbar that means the data which it is displaying when data was loaded. Ideally it should show "Displaying 0 of 0" after clearing. The following thing I am doing on clearing:

On pressing the clear button I am calling the clear method where
1. I am changing the Height of the Grid:
grid.setHeight(100);
2. Setting the Empty Message:
liveView.setEmptyText("Grid is clear");
3. Setting the new store in the view:
liveView.setStore(new ListStore<BeanModel>);

if I call recalculate method of the LiveToolItem which is displaying the current rows in the Toolbar then also it is not working.

What should I do for refreshing the ToolBar.

Any help will be appreciated.

Regards,
Nitin

sven
2 Aug 2010, 8:59 AM
There is no method "setStore" on the LiveGridView. The LiveToolItem gets the infos from the loader, so if you clear it, you need to tell your loader, that there are no records and than reload the loader. Everything will automatically refresh than.

nitinfuture
2 Aug 2010, 9:47 AM
Thanks for your suggestion, I will try.

nitinfuture
3 Aug 2010, 9:29 AM
Thanks sven..it worked..:)