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

Highlight a column or a row

Thread ID:

Created:

Updated:

Platform:

Replies:

31011 Jun 28,2005 09:02 PM UTC Aug 14,2006 03:57 PM UTC WinForms 5
loading
Tags: GridControl
jsun@doble.com
Asked On June 28, 2005 09:02 PM UTC

If you click a row header of a CridControl, the column is hightlighted. Same thing is true for a row. My question is how do you do it in code? In my program, when the user clicks other controls, I want the corresponding column including the header in the GridControl being highlighted. Thank you very much for help. J. Sun

Administrator [Syncfusion]
Replied On June 28, 2005 10:41 PM UTC

You can use code like: this.grid.Selections.SelectRange(GridRangeInfo.Col(2), true); this.grid.Selections.SelectRange(GridRangeInfo.Row(4), true);

Sharad Sharma
Replied On June 30, 2005 01:34 PM UTC

Hi Clay, I have a DataGridBoundData, on which the current row is moved up or down ward by using btnUp and btnDown buttons. My query is that, "the current row after move should again be highlighted". Awaiting for your reply. Thanks Takecare, bye Sharad Kapil Sharma >You can use code like: > >this.grid.Selections.SelectRange(GridRangeInfo.Col(2), true); >this.grid.Selections.SelectRange(GridRangeInfo.Row(4), true); >

Administrator [Syncfusion]
Replied On June 30, 2005 01:59 PM UTC

I assume your buttons are moving the grid.CurrentCell, correct? If so, the first thing to try is setting this property to see if this gives you what you want. grid.ListBoxSelectionMode = SelectionMode.One; If it does not, if you will explain what you need different, then maybe we can suggest something else.

Sharad Sharma
Replied On July 12, 2005 09:10 AM UTC

Hi Clay Burch, I have found the solution for my problem. Thanks >I assume your buttons are moving the grid.CurrentCell, correct? > >If so, the first thing to try is setting this property to see if this gives you what you want. > >grid.ListBoxSelectionMode = SelectionMode.One; > > >If it does not, if you will explain what you need different, then maybe we can suggest something else.

Martin Nitschke
Replied On August 14, 2006 03:57 PM UTC

I had an identical problem and yes, the solution Clay provided did fix the problem described for moving with Up/Down buttons.

For future reference, please do not just say "I have found the solution for my problem". Please post what the solution was, so people with an identical problem may know.

Thanks

>Hi Clay Burch,
>I have found the solution for my problem.
>
>Thanks
>
>>I assume your buttons are moving the grid.CurrentCell, correct?
>>
>>If so, the first thing to try is setting this property to see if this gives you what you want.
>>
>>grid.ListBoxSelectionMode = SelectionMode.One;
>>

>>
>>If it does not, if you will explain what you need different, then maybe we can suggest something else.

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.

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

;