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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Invert row selection

Thread ID:





11787 Mar 16,2004 05:38 AM UTC Mar 17,2004 06:00 AM UTC WinForms 3
Tags: GridControl
Raul Rosenthal
Asked On March 16, 2004 05:38 AM UTC

I cannot find an easy way to invert the current (row) selection in a grid. What I am trying to do is the following: I want to let the user select some rows, then press a button and have the selected rows unselected, while the previously unselected rows should become selected. Can you help, please? Thank you.

Administrator [Syncfusion]
Replied On March 16, 2004 08:56 AM UTC

Here is one solution that worked for me.
private void button1_Click(object sender, System.EventArgs e)
	GridRangeInfoList rangeList = this.gridControl1.Selections.GetSelectedRows(true, false);
	for(int row = 1; row <= this.gridControl1.RowCount; ++row)
		GridRangeInfo range = GridRangeInfo.Row(row);

Raul Rosenthal
Replied On March 17, 2004 06:00 AM UTC

That worked fine! Thank you!

Raul Rosenthal
Replied On March 17, 2004 06:00 AM UTC

That worked fine! Thank you!


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