博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
GXT 3 CheckBox edtiting issue
阅读量:6195 次
发布时间:2019-06-21

本文共 1429 字,大约阅读时间需要 4 分钟。

hot3.png

In GXT 2:
  CheckColumnConfig isStoredProcColumn = new CheckColumnConfig("isStoredProcedureCall", "Stored Procedure", 110);
//setEditor() is a method of CellEditor
  isStoredProcColumn.setEditor( new CellEditor(new CheckBox()));
  columnConfigs.add(isStoredProcColumn);
In GXT 3:
  ColumnConfig<KSCIntegrityBObjProxy, Boolean> isStoredProcColumn = new ColumnConfig<KSCIntegrityBObjProxy, Boolean>(integrityProps.isStoredProcedureCall(), 110, "Stored Procedure");
  isStoredProcColumn.setCell(new CheckBoxCell());
//addEditor() is a method of GridRowEditing
  stepsRowEditor.addEditor(isStoredProcColumn, new CheckBox());
  columnConfigs.add(isStoredProcColumn);
Depending on CellEditor is different from GridRowEditor, two kind of checkbox have different fuction. It means in GXT 3, the checkbox was available to edit before row in editing status. If the requirement was can not allow to edit before editing staus, one of solution like this:  add some handler to grid.
  scansGrid.addCellMouseDownHandler(new CellMouseDownHandler()
   {
    @Override
    public void onCellMouseDown(CellMouseDownEvent event)
    {
     scansGrid.getSelectionModel().select(event.getRowIndex(), false);
    }
   });
  scansGrid.addCellDoubleClickHandler(new CellDoubleClickHandler()
   {
    @Override
    public void onCellClick(CellDoubleClickEvent event)
    {
     stepsRowEditor.startEditing(new GridCell(event.getRowIndex(), event.getCellIndex()));
    }
   });

转载于:https://my.oschina.net/SherryYaliZhu/blog/86234

你可能感兴趣的文章
inotify 文件同步整理
查看>>
centos编译安装squid3.4
查看>>
2012年7月的主要目标
查看>>
加密的类型及其相关算法--证书机构
查看>>
sqoop的导入工具使用
查看>>
mysql笔记1(转)
查看>>
Unity开发了一款开心消消乐
查看>>
《第一行代码》2day~Activity
查看>>
Juniper 基于路由的×××
查看>>
关闭sql server 2005远程连接
查看>>
***测试03------windows日常巡检,应急响应等总结
查看>>
delphi xe 绘图
查看>>
字符集修改、Linux时间同步、调整文件描述符
查看>>
OSI七层模型03——数据封装
查看>>
centos安装vsftp
查看>>
查看Nginx、apache、MySQL和PHP的编译参数
查看>>
cs4.1 编译与安装
查看>>
BitmapFactory。Options.inSampleSize用法
查看>>
2017.12.27 3周3次课
查看>>
mysql 5.7 修改数据库表
查看>>