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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting CurrentCell Property

Thread ID:





36710 Nov 8,2005 02:29 PM UTC Nov 8,2005 04:31 PM UTC WinForms 1
Tags: GridControl
Darren Grafton
Asked On November 8, 2005 02:29 PM UTC

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?

Administrator [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon