when the row in edit mode, the column's editor is show, but is not editable or the column is displayed as its column type as ctNormal.
when the row in insert mode,the column's editor is editable.
i try it as setting "editor:=ednone" by OnGetCellType event of Grids,but when it run, the editor is disappeared.
procedure TDeviceIncome.TIWDBAdvWebGrid1GetCellType(Sender: TObject; RowIndex, ColumnIndex: Integer; var AColumnType: TTIWColumnType; var Editor: TTIWColumnEditor; var DynEditor: TTIWDynEditType); begin inherited; if (pADOQuery.State in [dsEdit]) and (ColumnIndex = 3) then begin AColumnType:=ctNormal; Editor := edNone; end; if (pADOQuery.State in [dsInsert]) and (ColumnIndex = 3) then begin AColumnType:=ctNormal; Editor := edEdit; end; end;
If there is a wrong in my method, how can i get this??
I have not been able to reproduce this issue using the sample code you have provided.
In "Edit" mode the editor is not displayed and In "Insert" mode the editor is displayed as expected.
If the problem persists, please provide a ready to run sample project that demonstrates the issue so I can further investigate this. Sample projects can be emailed to mailto:info@tmssoftware.com