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

Exception using group.IsExpanded=true

Thread ID:

Created:

Updated:

Platform:

Replies:

22759 Dec 21,2004 12:47 PM UTC Jan 7,2005 12:13 PM UTC WinForms 3
loading
Tags: Grouping
Jason Southgate
Asked On December 21, 2004 12:47 PM UTC

Hi I am using these methods to save and restore the expanded groups, but i am getting an exception on the line as indicated by the catch, and it leaves one of my groups collapsed. Please can you suggest a solution? /// /// Stores the currently expanded groups in the GridGrouping Control /// for later retrieval with RefreshAndRestoreExpandedGroups method. /// /// The GridGroupingControl on which to operate public void StoreExpandedGroups() { this.expandedBrokerGroups = new ArrayList(); foreach ( Group group in this.linkMonitorGrid.Table.TopLevelGroup.Groups ) { if ( group.IsExpanded==true ) { this.expandedBrokerGroups.Add( group.GetFirstRecord().GetValue("RefBrokerID") ); } } } /// /// Refreshes the grid and it''s underlying table, and retrieves any expanded /// groups previously saved with the StoreExpandedGroups method. /// /// The GridGroupingControl on which to operate public void RefreshAndRestoreExpandedGroups() { this.linkMonitorGrid.Table.TableDirty = true; foreach ( Group group in this.linkMonitorGrid.Table.TopLevelGroup.Groups ) { if ( this.expandedBrokerGroups.Contains( group.GetFirstRecord().GetValue("RefBrokerID") ) ) { try { group.IsExpanded=true; } catch {} } } this.linkMonitorGrid.Refresh(); }

Jason Southgate
Replied On December 21, 2004 12:50 PM UTC

The actual exception I get is A first chance exception of type ''System.ArgumentOutOfRangeException'' occurred in syncfusion.grouping.dll Additional information: Specified argument was out of the range of valid values.

Administrator [Syncfusion]
Replied On December 21, 2004 06:24 PM UTC

I think this must be related to other special settings in your grid. Can you post your application / a sample that shows the problem? Thanks, Stefan

Jason Hales
Replied On January 7, 2005 12:13 PM UTC

If it helps I''ve had similar problems to do with storing the expanded groups. If you set TableDirty and SummariesDirty: syncGrid.Table.TableDirty = true; syncGrid.Table.SummariesDirty = true; then enumerating though the groups will return false for group.IsExpanded when is was previosuly true. I''ve got roud this by storing the expanded groups and then setting TableDirty and SummariesDirty to true Jason >I think this must be related to other special settings in your grid. Can you post your application / a sample that shows the problem? > >Thanks, >Stefan >

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.

Please sign in to access our forum

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

;