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

Change datasource

Thread ID:





38177 Dec 7,2005 10:59 PM UTC Dec 8,2005 10:54 AM UTC WinForms 3
Tags: GridControl
Alejandro Serrano
Asked On December 7, 2005 10:59 PM UTC

Hi, I need to reuse a grid as part of my application by using completely different datasets. At first, I was trying to just assign a new value to the DataSource property, but it didn''t work. I also tried to remove the relations by hand, but it neither worked. Is there any way to completely get all the grid blank, getting out all relations, so I can assign a totally new DataSource?

Administrator [Syncfusion]
Replied On December 7, 2005 11:51 PM UTC

Try code like: this.gridDataBoundGrid1.DataSource = null; this.gridDataBoundGrid1.DataMember = ""; this.gridDataBoundGrid1.Binder.ResetHierarchyLevels(); this.gridDataBoundGrid1.DataSource = newDataSource; this.gridDataBoundGrid1.Binder.InitializeColumns();

Alejandro Serrano
Replied On December 8, 2005 10:50 AM UTC

I need a code like that, but for GridGroupingControl

Alejandro Serrano
Replied On December 8, 2005 10:54 AM UTC

>I need a code like that, but for GridGroupingControl I finally did it calling Grid1.Engine.ResetTableDescriptor()


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