We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

"Append Row" in GDBG

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?

3 Replies

AD Administrator Syncfusion Team June 3, 2005 12:41 AM UTC

Try handling the CurrentCellActivating event. In your handler, if e.RowIndex points to the append row, then set e.ColIndex = 1.


LS Lori S. Pearsall June 3, 2005 01:00 AM UTC

Hi Clay, 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.


AD Administrator Syncfusion Team June 3, 2005 08:19 AM UTC

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.

Loader.
Live Chat Icon For mobile
Up arrow icon