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.

How to select a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

57016 Feb 23,2007 12:52 PM Feb 26,2007 03:48 PM Windows Forms 3
loading
Tags: GridControl
Eric
Asked On February 23, 2007 12:52 PM

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


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

Hi,

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,

http://www.syncfusion.com/Support/user/uploads/select_a_cell_42e564fd.zip


select_a_cell.zip


Best Regards,
S.Shyam.


Eric
Replied On February 26, 2007 10:07 AM

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 03:48 PM

Figured it out:

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

this.CurrentCell.RowIndex is now 1.

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.

;