This question is locked. New answers and comments are not allowed.
Dear Community,
We have two silverlight telerik RadGrids on a page. Here is what we are doing:
We have two silverlight telerik RadGrids on a page. Here is what we are doing:
- We have an observable collection listExecutionHistory and it is being populated from database.
- We bind our first grid on a page using above collection.
- User can change the data of the grid and thus it will automatically update the observable collection as well because of two way binding.
- On click of a button say Next button on this page, we bind another RadGrid on the same page using this same collection. This grid has all read only columns because the sole purpose of this grid is just to show the updates made by the user in the collection via first grid on the same page.
- At a time only one grid is visible on the page. That means, when page loads, grid 1 is visible to the user and user can then make change in it. On click of Next button, grid 1 disappears and grid 2 (readonly columns only) become visible so that user can confirm the changes made.
Problem
The problem we are facing is that data of grid 2 is not refreshing everytime we click Next button and it still shows the old data. Following is the code we have on Next button:
ctlRollbackConfirmationGrid.ItemsSource = null; ctlRollbackConfirmationGrid.ItemsSource = listExecutionHistory; ctlRollbackConfirmationGrid.Rebind(); Since we are providing a new data source everytime we click Next button, the grid must refresh with new data in the collection but this is not happening. It keeps showing the old data.
Here is the xaml code of Grid 2
<telerik:RadGridView Name="ctlRollbackConfirmationGrid" AutoGenerateColumns="False" ShowGroupPanel="False" HorizontalAlignment="Center" IsFilteringAllowed="False" EnableColumnVirtualization="False" EnableRowVirtualization="False" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn UniqueName="CategoryID" DataMemberBinding="{Binding CategoryID}" IsVisible="False"/> <telerik:GridViewDataColumn Header="Category" Width="80" UniqueName="Category" DataMemberBinding="{Binding CategoryName}" /> <telerik:GridViewDataColumn Header="From Date" Width="75" DataMemberBinding="{Binding FromDate,StringFormat='MM/dd/yyyy'}" > </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="To Date" Width="75" DataMemberBinding="{Binding ToDate,StringFormat='MM/dd/yyyy'}" > </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Counter" Width="70" DataMemberBinding="{Binding CounterTime}" /> <telerik:GridViewDataColumn Header="Discrepancy Check" Width="300" DataMemberBinding="{Binding RollbackType}" /> </telerik:RadGridView.Columns> </telerik:RadGridView>:
Could you please urgently help us on this? Let me know if you need more details around the problem.
Regards,
Shiva