How to Add Listener to cell in GXT Editable Grid

限于喜欢 提交于 2019-12-11 18:39:34

问题


I am writing code for Editable Grid using GXT.I created one column with TextField as Editor like below:

column=new ColumnConfig();
    column.setId("checkinTime");
    column.setHeader("Check In Time");
    column.setWidth(80);
    column.setMenuDisabled(true);
    column.setSortable(false);
    final TextField<String> text = new TextField<String>();  
    column.setEditor(new CellEditor(text));
    configs.add(column);

Now I need to add Listener to the cell of this column to validate the value of the cell and need to reset the value if validations fails.Please suggest how to do this.

I am using Gxt 2.2.3.

UPDATE Below are the imports

import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.grid.CellEditor;

来源:https://stackoverflow.com/questions/22524914/how-to-add-listener-to-cell-in-gxt-editable-grid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!