This is a migrated thread and some comments may be shown as answers.

Grid Refresh

7 Answers 150 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael Salzlechner
Top achievements
Rank 1
Michael Salzlechner asked on 09 Feb 2011, 12:07 AM
i am trying to get this to work but am running into little issues all the time

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

Sort by
0
Michael Salzlechner
Top achievements
Rank 1
answered on 09 Feb 2011, 01:09 AM
Well i think i figured out the refreshing the whole list

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
0
Nedyalko Nikolov
Telerik team
answered on 14 Feb 2011, 03:36 PM
Hi Michael Salzlechner,

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.

Kind regards,
Nedyalko Nikolov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Vina
Top achievements
Rank 1
answered on 13 May 2011, 04:56 AM
I am having the same issue with my RadDataPager.

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.

0
Nedyalko Nikolov
Telerik team
answered on 16 May 2011, 11:59 AM
Hi Michael Salzlechner,

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?

Greetings,
Nedyalko Nikolov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vina
Top achievements
Rank 1
answered on 17 May 2011, 04:46 AM
Thank you for your reply.
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.
0
Nedyalko Nikolov
Telerik team
answered on 17 May 2011, 02:38 PM
Hello Vina W,

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?

Kind regards,
Nedyalko Nikolov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vina
Top achievements
Rank 1
answered on 18 May 2011, 09:01 AM
Hi,

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.
Tags
GridView
Asked by
Michael Salzlechner
Top achievements
Rank 1
Answers by
Michael Salzlechner
Top achievements
Rank 1
Nedyalko Nikolov
Telerik team
Vina
Top achievements
Rank 1
Share this question
or