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.

Selecting a row programmtically

Thread ID:

Created:

Updated:

Platform:

Replies:

8731 Nov 18,2003 03:39 AM Nov 18,2003 10:31 AM Windows Forms 7
loading
Tags: GridControl
Per Millard
Asked On November 18, 2003 03:39 AM

When setting ListBoxSelectionMode = SelectionMode.One and handling the CurrentCellMoving and CurrentCellActivating events to obtain full row selection, clicking a row will mark the whole row as selected by highlighting the entire row with a different background color. How can you make this row selection programmtically i.e. how do you move the row selection to a specific row, just as if you clicked on it or move to it using the arrow keys ?

Thomas Zueger
Replied On November 18, 2003 05:23 AM

Hi Per I'm using f.e. this command to move to the last row in the GDBG: this.grdContacts.CurrentCell.MoveTo( this.grdContacts.Model.RowCount, 1 ); Regards, Thomas

Per Millard
Replied On November 18, 2003 07:01 AM

> Hi Per > > I'm using f.e. this command to move to the last row in the GDBG: > this.grdContacts.CurrentCell.MoveTo( this.grdContacts.Model.RowCount, 1 ); > > Regards, > Thomas Thanx Thomas, But I've already tried using MoveTo. It returns false to indicate an error, and nothing happends Regards Per

Administrator [Syncfusion]
Replied On November 18, 2003 07:05 AM

If the grid is not visible when you are making this call, also try setting grid.ForceCurrentCellMoveTo = true;

Administrator [Syncfusion]
Replied On November 18, 2003 10:13 AM

> If the grid is not visible when you are making this call, also try setting grid.ForceCurrentCellMoveTo = true; > Hi Clay The grid is visible when making the call Any other ideas ? Regards Per

Administrator [Syncfusion]
Replied On November 18, 2003 10:14 AM

> If the grid is not visible when you are making this call, also try setting grid.ForceCurrentCellMoveTo = true; > ... by the way, the grid is virtual Regards Per

Administrator [Syncfusion]
Replied On November 18, 2003 10:30 AM

Did you try setting ForceCurrentCellMoveTo anyway? It may make things work. Other things to try are to make sure the grid has focus (like grid.Focus()), or that the grid is the active control (like this.ActiveControl = grid where 'this' is the form).

Administrator [Syncfusion]
Replied On November 18, 2003 10:31 AM

Also check whether you target cell has style.Enabled = true.

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.

;