This question is locked. New answers and comments are not allowed.
Hi,
I have a raddomaindatasource defined in XAML
I have bound a raddatagrid with the DataView on raddomaindatasource:
The query executed by domaindatasource is a simple query from an entitymodel.
I have added a button to the xaml page
when the button is clicked, i execute a domaindatasource.Load(), Before executing this statement, i have hooked the LoadedData event and in this event i perform a grid.Rebind():
On the database, i have opened the SQL Server Management studio and i change for example the date of the invoice.
When the user clicks the button, i can debug the code... I executes the query on the entityframework and i notice that the correct data is loaded at that point. But when the debugger returns on the client and in the LoadedData event, i notice that the LoadedDataEventArgs still contains the old records!!!
It looks like the RadDomainDataSource is working with Cached data... how can i tell the raddomaindatasource to use the newly fetched data instead?
Best Regards,
Peter
I have a raddomaindatasource defined in XAML
I have bound a raddatagrid with the DataView on raddomaindatasource:
<telerik:RadGridView x:Name="InvoicesGrid" ItemsSource="{Binding ElementName=invoicesDomainDataSource, Path=DataView}" The query executed by domaindatasource is a simple query from an entitymodel.
var sortedinvoices = from inv in ObjectContext.InvoiceViews orderby inv.DateOfInvoice descending where inv.Name.Contains(search) || search == "" select inv; return sortedinvoices; I have added a button to the xaml page
when the button is clicked, i execute a domaindatasource.Load(), Before executing this statement, i have hooked the LoadedData event and in this event i perform a grid.Rebind():
private void RefreshClick(object sender, RoutedEventArgs e) { invoicesDomainDataSource.LoadedData += new EventHandler<Telerik.Windows.Controls.DomainServices.LoadedDataEventArgs>(invoicesDomainDataSource_LoadedData); invoicesDomainDataSource.Load(); } void invoicesDomainDataSource_LoadedData(object sender, Telerik.Windows.Controls.DomainServices.LoadedDataEventArgs e) { this.InvoicesGrid.Rebind(); }On the database, i have opened the SQL Server Management studio and i change for example the date of the invoice.
When the user clicks the button, i can debug the code... I executes the query on the entityframework and i notice that the correct data is loaded at that point. But when the debugger returns on the client and in the LoadedData event, i notice that the LoadedDataEventArgs still contains the old records!!!
It looks like the RadDomainDataSource is working with Cached data... how can i tell the raddomaindatasource to use the newly fetched data instead?
Best Regards,
Peter