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

Exception switching DataSource of GDBG

Thread ID:





7624 Oct 3,2003 02:07 PM UTC Oct 3,2003 03:13 PM UTC WinForms 1
Tags: GridControl
Gene Gorokhovsky
Asked On October 3, 2003 02:07 PM UTC

I have a problem in the following scenario 1) Assign a DataSource to DataBoundGrid with cols A,B,C 2) Let user sort by column C 3) clear columns and internal columns collection and change datasource programmatically to one with only columns A,B Grid crashes with IndexOutOfRangeException looking for column C. The correct behavior (as in MS Datagrid) is to become unsorted. DataBoundGrid

Administrator [Syncfusion]
Replied On October 3, 2003 03:13 PM UTC

Use the following code to reassigning the datasource to the grid, otherwise some internal settings are not correctly reset: this.gridDataBoundGrid1.DataSource = null; this.gridDataBoundGrid1.Binder.ResetHierarchyLevels(); this.gridDataBoundGrid1.DataSource = dataSource; Stefan


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