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
close icon

Setting CurrentCell Property

I populate the grid with rows and am handling the Click event of the grid and checking the gridObject.CurrentCell to be able to tell which row has been clicked. Later I repopulate the grid with different rows, but the currentCell property of the grid stays referencing cells I''ve removed from the grid by resetting the rowCount to be the header count. The click event from clicking the grid''s header row is also not resetting the gridObject.CurrentCell, because allow rowheader selection is disabled, so now my code is looking for a currentCell that is no longer there. I have looked for a way to reset the current cell manually but can''t find it. Any suggestions?

1 Reply

AD Administrator Syncfusion Team November 8, 2005 04:31 PM UTC

You can use the grid.CurrentCell.MovetTo method to set the grid''s current cell. One other comment is the the grid has e grid.CellClick event that you might consider using. It has e.RowIndex and e.ColIndex of the clicked cell set in its event arguments.

Loader.
Live Chat Icon For mobile
Up arrow icon