GXT 3 CheckBox edtiting issue

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()));
    }
   });

你可能感兴趣的:(checkbox,GXT3)