A RadGridView is then bound to this, and users can click on rows, to see a graphical summary of the selected table.
The definition is:-
Whilst I don't need to keep this up to date in real time, I do neet to be able to allow users to refresh the data, so see if any changes have been made.
I've added a refresh button with the code:-
But whilst the gridview shows the busy indicator, and goes through the motions of refreshing, the data doesn't reflect the changes in the view.
11 Answers, 1 is accepted
The RIA DomainContext caches the entities it has already downloaded from the server and only transports adds or deletes from the server. RadDomainDataSource exposes the LoadingData event. You can handle it like so:
This will override the default RIA behavior and replace the already-cached entities with the data coming from the server.
the Telerik team
I have two radGrid with two different domaindatasource
when i edit a row in the first radgrid i need to refresh data in the second one.
So i have done :
But the second grid refresh before Submitchanges have effect so i have to refresh another time to see changes ...
How i can solve this problem?
It works very nice :)
this doesn't work for me....
this is my RadDomainDataSource definition:
DashboardSubsidiary is a variable defined in my code-behind, in the beginning of my control I'm using :
this.DataContext = this;
so I can capture the value of the variable that I receive as parameter, everything works ok, I'm using a LoadDelay (I removed the parameter because is not my problem now...) is working ok as well.
The problem is that I need to refresh my RadDomainDataSource, because AutoLoad is True, the first time is ok, but, when I change the paramerter, is not refreshing the grid...
This is the code of the grid:
and this is the .cs code:
the private method RadDomainDataSourceOrgUnit_LoadingData is not working in my case, or the variable is not changing... if I call the Load method of the RadDomainDataSource, I need to control the textbox that I'm using to search (I removed in this example) data... because the property AutoLoad should be False.
Could you please try your scenario with our latest internal build (2011.1.0627)? If the problem persists please send me a sample application, which I can debug on my side in order to see what is going on.
Thank you in advance.
the Telerik team
the latest internal build (2011.1.0627) doesn't work either, is there any other way to do it? maybe if I do everything in the code behind?, I'm not using MVVM. Please I need a solution for this.
I have another idea... if I try to update the QueryParameters in the code-behind, where should I do it?, I have a control that loads a RadGridView, when I call this control from my page, I'll update my parameters but I want to be sure that the QueryParameters update is executed before going to the server.
I found a solution, please let me know if this is ok!
The xaml code is the same as before, the difference is instead of assigning a value to "subsidiary" parameter in the xaml page, I do this in the code-behind like this:
LoadInfo is called from the page that has inside my user control, the RadDomainDataSource and the RadGridView xaml code is defined in my previous post, I want to be sure that the AutoLoad is executed after changing all my parameters... in my example I have only one paramater "subsidiary" but in my real code I have more, so I want to be sure that all parameters are changed and right after that, the AutoLoad is executed with the new values.
I have another question...
How can I remove all rows of a RadGridView that is using a RadDomainDataSource?, I can't use ItemsSource = null because I don't see any record after... (I'm talking about my previous post), the problem is a visual problem for a couple of seconds.
First I'm reading data in my RadGridView using RadDomainDataSource, then I have a button to read something different in the same RadGridView, my first read has only one column, my second read has two columns.
As soon as I click the button, I see the two columns but with data of my previous read, and right after that is refreshing the data correctly, it's just a couple of seconds, I'm using AutoLoad=True.
I used this:
when I'm not using RadDomainDataSource, but is not working in this case.
Is there any way of remove all rows in the right moment before showing the second read?
Generally both approaches should work, since they are almost equal. Unfortunately I cannot guess what is going on with the first (xaml + binding) approach without a sample project.
(Answer to the last post)
Do you mean that RadGridView shows old data while loading is in progress? If so you could use RadGridView.IsBusy property bound to RadDomainDataSource.IsBusy. Then you will see a busy indicator while loading is in progress.
the Telerik team