essentially i have a GridView connected to a DomainDataSource that uses a RIA query
as i have data on screen a number of things can change that data
the client i am on can modify or delete data shown in the grid
a different client can modify or delete data shown in the grid
and of course data can be added on different clients as well
to simplyfy i added a button that allows me to refresh the grid and all the things i tried so far fail somehow
some look like they refresh but only the grid gets refreshed no data reloaded from the server
some reload modified data but do not properly remove deleted rows or insert new rows
i would like to be able to do the following.
1) Reload the whole list with all the new data from the server
2) just refresh the current row from the server (if modified show changes if deleted remove)
thanks for any help
Mike
7 Answers, 1 is accepted
calling Load on the DomainDataSource and also setting the LoadBehaviour to RefreshCurrent in the LoadingData event seems to do the trick
Now it would be nice to be able to just refresh the current row and/or reload all data but try to keep the page the same or close to what it was. In a different system we use we have the ability to refresh the grid but start with the currently selected row and essentially the grid gets filled up and down from there
Mike
I think that if you use RadDataPager bound to DomainDataSource.DataView property after refresh (Load) RadDataPager should navigate to the previous page index.
Let me know if the problem persists.
Nedyalko Nikolov
the Telerik team
I have a RadGridView and a RadDataPager that both has the same DomainDataSource as the source.
When user navigate to pages that is not the first page, and I call DomainDataSource.Load() function, It does not retain the page index property in the DomainDataSource, and therefore It will always show the first page.
What I want is that When the DomainDataSource.Load() function is called , it will maintain the page index of the gridview, and also maintain the selected item of the grid.
I have tried to bound the RadDataPager to DomainDataSource.DataView property but no luck.
Thank you for your help.
I'm attaching my test project, which works as expected on my end.
Could you please provide me with a little bit more information how to simulate the problem you are facing with?
Nedyalko Nikolov
the Telerik team
I believe I found why mine does not work and yours work.
You are using the Telerik RadDomainDataSource, whereas I am using the the <riacontrols:DomainDataSource. />
This is what I have:
...
xmlns
:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"
....
<!--<telerik:RadDomainDataSource x:Name="rdds" QueryName="GetCustomers" PageSize="2" >
<telerik:RadDomainDataSource.DomainContext>
<web:NorthwindContext />
</telerik:RadDomainDataSource.DomainContext>
</telerik:RadDomainDataSource> -->
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance web:Customer, CreateList=true}" Height="0" PageSize="2" LoadedData="customerDomainDataSource_LoadedData" Name="rdds" QueryName="GetCustomersQuery" Width="0">
<riaControls:DomainDataSource.DomainContext>
<web:NorthwindContext />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>
I have modified so that its using the riacontrols:DomainDataSource instead of the Telerik ones,
And when I navigate through the other pages, and then click the 'Load' button again, it will cause the page to come back to page 1.
What should I do so that it maintain the page ??
Thank You.
We cannot provide support for riaControls:DomainDataSource control.
Could you please try to replace the telerik:RadDataPager with sdk:DataPager and let me know how it works?
Nedyalko Nikolov
the Telerik team
I Tried to replace telerik:RadDataPager with sdk:DataPager but no luck.
I've decided to just use the telerik:RadDomainDataSource. It works now.
Thanks for all your help.
Vina.