Tuesday, April 20, 2010

Grid Row Refresh GXT

Probably most of you out there must have known how to do that. But to just put it in paper, this is how we can refresh a particular grid row instead of refreshing or reloading the entire grid.

                      GridView has a refreshRow method inbuilt but it is not publicly available for some reason. So we can extend the GridView class as shown below to create our own method of refreshRow. Using refreshRow instead of refreshing the whole grid is faster when you are working on a grid with way too much data.

import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.store.StoreEvent;
import com.extjs.gxt.ui.client.widget.grid.GridView;
public class MyGridView extends GridView{
	public void refreshRow(int row) {