I''m attempting to force the CurrentCell to the first data column when the user either clicks on the "append row" in the grid or uses the "*" button in the grid''s GridRecordNavigationControl.
I''ve put code in the RowEnter event to check to see if the append row is the one being entered. Then, I do a CurrentCell.MoveTo to try to move to the first data column. However, the MoveTo returns a false indicating that the move failed.
How can I change the column of the CurrentCell?
ADAdministrator Syncfusion Team June 2, 2005 07:41 PM
Try handling the CurrentCellActivating event. In your handler, if e.RowIndex points to the append row, then set e.ColIndex = 1.
LSLori S. PearsallJune 2, 2005 08:00 PM
I was trying to handle this in the RowEnter because I only want to move to the first data column when I first enter the row. If I use CurrentCellActivating, I''ll always move to the first data column - even if I''m already on the row and am tabbing to a new column. Does that make sense? How would I do this?
Thanks as always!
>Try handling the CurrentCellActivating event. In your handler, if e.RowIndex points to the append row, then set e.ColIndex = 1.
ADAdministrator Syncfusion Team June 3, 2005 03:19 AM
CurrentCellActivating is the best place to redirect the ColIndex. Since you only want to do it once, set a flag to be true in RowEnter. Then in CurrentCellActivating, only redirect the e.ColIndex if this flag is true and e.RowIndex is the last row, and then reset the flag to false.