The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator Syncfusion Team 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;
IBInder BabbraMay 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;
>