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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing datasource on GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

14138 May 19,2004 08:37 AM UTC May 19,2004 10:35 AM UTC WinForms 2
loading
Tags: GridControl
Inder Babbra
Asked On May 19, 2004 08:37 AM UTC

When I change the datasource on a databound grid dynamically in code, the model is not getting updated. e.g if the datasource resulted in 3 rows being displayed, after setting the datasource to null the model still shows rowcount as 3. Please help.

Administrator [Syncfusion]
Replied On May 19, 2004 10:28 AM UTC

After changing the datasource, try calling Me.Grid.Refresh(); to see if that make things work. Also, how are you changing the datasource? You might try setting it to null before setting it to a new datasource. this.gridDataBoundGrid1.DataMember = ""; this.gridDataBoundGrid1.DataSource = null; this.gridDataBoundGrid1.DataMember = newDataMember; this.gridDataBoundGrid1.DataSource = newDataSource;

Inder Babbra
Replied On May 19, 2004 10:35 AM UTC

Yes the refresh worked thx. >After changing the datasource, try calling > >Me.Grid.Refresh(); > >to see if that make things work. > >Also, how are you changing the datasource? You might try setting it to null before setting it to a new datasource. > > >this.gridDataBoundGrid1.DataMember = ""; >this.gridDataBoundGrid1.DataSource = null; >this.gridDataBoundGrid1.DataMember = newDataMember; >this.gridDataBoundGrid1.DataSource = newDataSource; >

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

;