Hi,
I'm experiencing problems while typing data in an etMemo field in the Grid.
At first entering text works fine, but after clicking a checkbox in the grid, I can't type in text anymore in the etMemo field.
What I do is the following:
* I click with the mouse in a Value field on the 3rd column
* I can enter any text I want
* Then (without exiting the value field first) I click on the checkbox (1st column)
* Then (without exiting the value field first) I click on the checkbox (1st column)
* With the mouse I return to the value field again.
* At this point I can't type in more text
To reproduce this do the following:
* Create an new Multi-Device application
* Drop a TMSFMXGrid on the form (align Client)
* Implement the OnGetCellEditorType Event
* Implement the FormCreate Event
I used this code:
procedure TForm1.FormCreate(Sender: TObject);
var
idx : Integer;
column: TTMSFMXGridColumn;
begin
TMSFMXGrid1.Options.Editing.Enabled := True;
TMSFMXGrid1.Options.Keyboard.TabKeyDirectEdit := True;
TMSFMXGrid1.Options.Keyboard.EnterKeyHandling := ekhNone;
TMSFMXGrid1.Options.Keyboard.DeleteKeyHandling := dkhNone;
TMSFMXGrid1.Options.Keyboard.InsertKeyHandling := ikhNone;
TMSFMXGrid1.Options.Mouse.DirectEdit := True;
TMSFMXGrid1.SelectionMode := smSingleCell;
TMSFMXGrid1.FixedColumns := 0;
TMSFMXGrid1.FixedRows := 0;
TMSFMXGrid1.Options.ColumnSize.Stretch := False;
TMSFMXGrid1.Clear;
TMSFMXGrid1.Columns.Clear;
column := TMSFMXGrid1.Columns.Add;
column.ColumnType := ctCheckBox;
column.Width := 25;
column := TMSFMXGrid1.Columns.Add;
column.Width := 400;
column := TMSFMXGrid1.Columns.Add;
column.Width := 200;
TMSFMXGrid1.Options.ColumnSize.StretchColumn := 2;
TMSFMXGrid1.Options.ColumnSize.Stretch := True;
TMSFMXGrid1.RowCount := 100;
TMSFMXGrid1.FixedRows := 1;
TMSFMXGrid1.Cells[1, 0] := 'Name';
TMSFMXGrid1.Cells[2, 0] := 'Value';
for idx := 0 to TMSFMXGrid1.RowCount - 1 do
begin
TMSFMXGrid1.RowHeights[idx + 1] := 80;
TMSFMXGrid1.Cells[1, idx + 1] := 'Value ' + IntToStr(idx);
end;
end;
procedure TForm1.TMSFMXGrid1GetCellEditorType(Sender: TObject; ACol, ARow: Integer; var CellEditorType: TTMSFMXGridEditorType);
begin
if ACol = 2 then
CellEditorType := TTMSFMXGridEditorType.etMemo;
end;