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.
Syncfusion Feedback

Grouped Columns - clear selection

Thread ID:

Created:

Updated:

Platform:

Replies:

70135 Nov 28,2007 03:37 PM UTC Nov 29,2007 09:43 AM UTC Windows Forms 1
loading
Tags: GridControl
Shipra Gupta
Asked On November 28, 2007 03:37 PM UTC

Hello,

I have a grouping grid with grouped columns. If the row is selected, the following statement to clear any existing grid selection raises an exception

// clear any existing grid selections
grid.TableControl.Selections.Clear();

Exception Raised -
Syncfusion.Grouping.Element get_Item(Int32) - Specified argument was out of the range of valid values.

However, when there are no grouped columns defined, the statement to clear the selection (above) works fine! I am using Syncfusion Essential Suite 2.1.0.50

Is this a known issue?

Thanks
Shipra



Administrator [Syncfusion]
Replied On November 29, 2007 09:43 AM UTC

There were problems reported in TableControl.Selections.Clear back in July-August 2004. They were corrected. If you upgrade to a more recent release, the problem should not occur.

Just some things to try as a work around.

1) try setting grid.TableControl.CurrentCell.MoveTo(-1, -1) before you call Clear.

2) Instead of calling Clear, try this code:

while (this.gridGroupingControl1.TableControl.Selections.Count > 0)
{
this.gridGroupingControl1.TableControl.Selections.Remove(this.gridGroupingControl1.TableControl.Selections.Ranges[0]);
}



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

;