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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Selecting Rows & Cols

Thread ID:





7170 Sep 15,2003 12:17 PM UTC Sep 17,2003 11:31 AM UTC WinForms 2
Tags: GridControl
John Bowman
Asked On September 15, 2003 12:17 PM UTC

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 03:50 PM UTC

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

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


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

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

Live Chat Icon For mobile
Live Chat Icon