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.

Change datasource

Thread ID:

Created:

Updated:

Platform:

Replies:

38177 Dec 7,2005 05:59 PM Dec 8,2005 05:54 AM Windows Forms 3
loading
Tags: GridControl
Alejandro Serrano
Asked On December 7, 2005 05:59 PM

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 06:51 PM

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 05:50 AM

I need a code like that, but for GridGroupingControl

Alejandro Serrano
Replied On December 8, 2005 05:54 AM

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

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.

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.

;