I have a curious problem using the grid with Flexcel. I want to replicate Excel's behaviour where editing is activated after a double-click, rather than just a click. The grid doesn't have OnCellDblClick so I've used the following in OnDblClick:
cell := (Sender as TTMSFMXGrid).FocusedCell;
(Sender as TTMSFMXGrid).Options.Editing.Enabled := true;
(Sender as TTMSFMXGrid).EditCell(cell);
In OnCellEditDone I then disable editing. However, after I edit the cell, all cells on that row become empty, apart from the edited cell. If I scroll the grid down then back up the values re-appear. I've tried grid.Repaint and grid.UpdateGridCells but to no avail.
Note that I'm using the grid in virtual mode and retrieving the data from the TXlsFile in the OnGetCellData event.
I forgot to ask - any chance of an OnCellDblClick for the grid?
The code works as expected here on a default grid, are you able to reproduce this on a grid with some random data?
Sorry Pieter - sat down at my desk this morning and immediately spotted a bug in my OnGetCellData handler. Note to self - avoid 1am bug reports....
The only disadvantage of the approach I'm using is that double-clicking on a header cell also activates editing in the selected cell. I can live with this, but an option to have editing require a cell double-click would be good.
Very nice grid, BTW.
Thank you for your feedback.
We will add this on our feature request list.