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 Rows & Cols

Thread ID:

Created:

Updated:

Platform:

Replies:

7170 Sep 15,2003 08:17 AM Sep 17,2003 07:31 AM Windows Forms 2
loading
Tags: GridControl
John Bowman
Asked On September 15, 2003 08:17 AM

By default, when a user clicks the column header in a Grid control, the entire col is highlited and selected. In my case, I'm inside the OnKeyUp event, handling some... shall we say ... "magic key strokes". When they occur I need to be able to move the selection to the col header cell & select the entire col programmatically, just as if the user had selected the col header w/ the mouse in the first place. I have the current ColIndex, so how do I tell it to do the normal column selection and hilite? I tried calling my existing OnMouseDown event on this col header cell as shown in the attached file. But this only seems to select the one col header cell, not the entire column. So, how do I select & hilite the entire column?

Administrator [Syncfusion]
Replied On September 15, 2003 11:50 AM

You can select a column programatically with code like: grid.Selections.Add(GridrangeInfo.Col(colIndex)); Will this do what you need?

John Bowman
Replied On September 17, 2003 07:31 AM

Clay, That's it! Thanks... seems to work great. John

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.

;