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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Programmatically selecting and deselecting rows

Thread ID:

Created:

Updated:

Platform:

Replies:

28728 May 9,2005 05:00 PM UTC May 9,2005 06:05 PM UTC WinForms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On May 9, 2005 05:00 PM UTC

I am sure this has been asked many times, but I have looked through the docs and KB, but still have not found the answer. How do I programmatically select or deselect a row? For example, if row 2-5 and 8 are selected, but lets say a button somewhere deselects all rows that are a multiple of three, then the result would be 2, 4, 5, and 8 being selected. If it is not trivial, just point me to the place in class reference where I should look and I will figure it out. Thanks

Administrator [Syncfusion]
Replied On May 9, 2005 05:00 PM UTC

Btw, I''m using a virtual grid

Administrator [Syncfusion]
Replied On May 9, 2005 05:15 PM UTC

Here are three methods you can use to manipulate selections: clear all selections - grid.Selections.Clear select/unselect a range - grid.Selections.SelectRange check if a range is selected - grid.Selections.Ranges.AnyRangeContains

Administrator [Syncfusion]
Replied On May 9, 2005 06:05 PM UTC

Clay: Thanks for the direction. I was on the right track with grid.Selections.SelectRange but I did not see the static method GridRangeInfo.Row(rowIndex). For others that come across this, my solution is: this.gridControlNodeList.Selections.SelectRange(GridRangeInfo.Row(e.Index), e.Selected); where e is my eventargs object that contains the rowindex and if the row is selected or not.

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

;