I have a virtual grid which changes the number of rows it has during a SaveCellInfo event, and has the last row disabled but for the first column. I''m trying to deal with a situation where during my SaveCellInfo event the row changes so that the current row is now the last row, and the cell which is being moved to (by a tab key press from the first column which triggered the SaveCellInfo) will be disabled. I want to set the current cell back to the first column (which is enabled), and I can detect when I''m in this situation, but since I''m in a MoveTo I can''t seem to change the current cell (it appears to get set back to the original destination after the event).
Do you have any suggestions how I can change what the new Current Cell location would be?
ADAdministrator Syncfusion Team April 18, 2004 04:10 PM
Instead of trying to add the row and change the current cell in SaveCellInfo, can you do it in QueryNextCurrentCell? This is the event that is fired to let you dynamically change where the current cell is going. SaveCellInfo was not intended to be used for this functionality.
SHSue HarrisApril 18, 2004 09:26 PM
I could possibly use the QueryNextCurrentCell event. However, what sort of assumptions can I make. Will the current cells value (if changed) be what will be used in the SaveCellInfo, or is there any possibility that the QueryNextCurrentCell can be called during editing (before it is finished)? If I set the next cell back to the current cell, will the SaveCellInfo event still get called?
ADAdministrator Syncfusion Team April 19, 2004 01:10 AM
QueryNextCurrentCell will only be called when your user indicates he wants to leave the cell by clicking off the currentcell or tabbing or arrowing out of the currentcell.
I am not sure whether SaveCellInfo would be called if you set the currentcell back to itself. I suspect it would be. If it is not, then you can always force the a SaveCellInfo hit (provided the value has changes) by calling grid.CurrentCell.ConfirmChanges.