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.
Unfortunately, activation email could not send to your email. Please try again.

Setting CurrentCell Property

Thread ID:

Created:

Updated:

Platform:

Replies:

36710 Nov 8,2005 09:29 AM Nov 8,2005 11:31 AM Windows Forms 1
loading
Tags: GridControl
Darren Grafton
Asked On November 8, 2005 09:29 AM

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 11:31 AM

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.

CONFIRMATION

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.

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.

;