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

How to select a cell

Thread ID:





57016 Feb 23,2007 05:52 PM UTC Feb 26,2007 08:48 PM UTC WinForms 3
Tags: GridControl
Asked On February 23, 2007 05:52 PM UTC

I just want to select a cell, so it is the current cell.

Administrator [Syncfusion]
Replied On February 23, 2007 10:26 PM UTC


This can be achieved by using SelectRange method in the Selections property. The following is the code snippet, please try it and let us know if you need any further assistance.

this.gridControl1.Selections.SelectRange(GridRangeInfo.Cell(a,b), true);

Here I attached my sample,



Best Regards,

Replied On February 26, 2007 03:07 PM UTC

I'm just trying to select the first cell in the first column.
this.Selections.SelectRange(GridRangeInfo.Cell(0, 0), true);

Yet, even after this line, the RowIndex is -1:

this.CurrentCell.RowIndex; <- should NOT be -1

Administrator [Syncfusion]
Replied On February 26, 2007 08:48 PM UTC

Figured it out:

this.CurrentCell.MoveTo(GridRangeInfo.Cell(1, 1), GridSetCurrentCellOptions.SetFocus);

this.CurrentCell.RowIndex is now 1.


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

or the page will be automatically redirected to 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