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

RadGrid Selection lost

2 Answers 144 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vipin
Top achievements
Rank 1
vipin asked on 11 May 2011, 03:21 PM

Hi sir,

I am using telerik Radgrid , I want to reload the RadGrid in every 5 seconds (for getting new value from data base). When reloading the page the selection was disappearing, please provide suggestions.

 

Whether the RadGrid provide any feature for getting data from database continuously, not even rebinding    

2 Answers, 1 is accepted

Sort by
0
Gimmik
Top achievements
Rank 1
answered on 11 May 2011, 06:34 PM
Hi Vipin,

I don't think where is a way to refresh a RadGrid (or any grid) without rebinding. Every time you rebind the grid, your selection will be lost. This is normal behavior since the Web Application doesn't know the state of the RadGrid after the bind operation. Hopefully you have a unique ID on your data. If this is the case it should be a simple matter to write a client-side function in Javascript to reselect the previously selected row after a bind operation.

Here is a great walk-through that will show you how to accomplish this:
http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html

You may want to look into binding to a Web Service for real-time data updates. Telerik has a nice demo of how to do that here:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/livedata/defaultcs.aspx
0
vipin
Top achievements
Rank 1
answered on 14 May 2011, 12:53 PM
Hi Gimmik,
 thanks for the supporting
Tags
Grid
Asked by
vipin
Top achievements
Rank 1
Answers by
Gimmik
Top achievements
Rank 1
vipin
Top achievements
Rank 1
Share this question
or