Grid的常用属性 //auto expand column ,the default value of the //setAutoExpandMax is 500 this.grid.setAutoExpandColumn(""); this.grid.setAutoExpandMin(150); this.grid.setAutoExpandMax(50000); this.grid.setBorders(true); this.grid.getView().setEmptyText(errorMonitorMessages.Grid_Empty_Text()); //use a column of checkbox to control selection //model(single or multi) this.grid.setSelectionModel(checkColumn); this.grid.addPlugin(checkColumn); //cell event: CellClick single click; //CellDoubleClick double click; this.grid.addListener(Events.CellClick, new Listener<GridEvent<T>>() {} new ColumnConfig("","",100).sortAble(false); //the steps that a grid binds with a //pagingtoolbar CeRpcProxy<PagingLoadResult<T>> proxy = new CeRpcProxy<PagingLoadResult<T>>() { @Override protected void load(final Object loadConfig, final AsyncCallback<PagingLoadResult<T>> callback) { errorDBService.getMessageExchangeErrors((PagingLoadConfig) loadConfig, ErrorMonitorView.this.pageSize, callback); } }; this.loader = new BasePagingLoader<PagingLoadResult<T>>(proxy); this.gridStore = new ListStore<?>(this.loader); this.toolBar = new MyPagingToolBar(pageSize); this.toolBar.setHeight("30"); this.toolBar.setTextBoxWidth("60"); this.toolBar.bind(this.loader); ColumnModel columnModel = createColumnConfig(); this.grid = new EditorGrid<T>(this.gridStore, columnModel); //watch out: //1 the model(T) should be basemodel not //beanmodel //2 all the configuration of the remotesort //should be cleared //3 the column name of the columnConfig must be //the same as what it is in the modelData or // pojo(the first letter should be in a lower case)