Hi,
I have a grid view which is binded to a data source. The grid view is refreshing every 1 minute using a timer. I need suggestions for the following.
I have a grid view which is binded to a data source. The grid view is refreshing every 1 minute using a timer. I need suggestions for the following.
- How can i retain the selected row after refreshing the grid view?
- How can retain the selected row after sorting?
- How can i change the color of row based on a column value after refreshing?
Your help will be really appreciated.
Thanks,
Gayu
5 Answers, 1 is accepted
0
Hi,
Vlad
the Telerik team
I suggest you to check this blog post for more info. The scenario is very similar to your case however I've used 1 ms instead 1 minute.
Greetings,Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Gayu
Top achievements
Rank 1
answered on 27 Nov 2010, 10:39 AM
Thanks for the help. I will try and get back to you.
Regards,
Gayu
Regards,
Gayu
0
Gayu
Top achievements
Rank 1
answered on 28 Nov 2010, 09:57 AM
Hi,
I tried the sample application given by you. I tried the same thing in WPF application. But i am not able to derive the cellstyleselector class from styleselector. I have included Telerik.windows.control, but then also styleselector is not coming. Let me know how to proceed.I am using telerik Q1 2010 SP2.
Regards
I tried the sample application given by you. I tried the same thing in WPF application. But i am not able to derive the cellstyleselector class from styleselector. I have included Telerik.windows.control, but then also styleselector is not coming. Let me know how to proceed.I am using telerik Q1 2010 SP2.
Regards
0
Gayu
Top achievements
Rank 1
answered on 28 Nov 2010, 12:05 PM
Hi,
I managed to run the same as a wpf application. But i have few more queries.
I managed to run the same as a wpf application. But i have few more queries.
- In the given code, it is creating a new item and adding the same in the grid without rebinding. But i need to rebind the grid. In my case, there would be new items added and others items updated. So how can i achieve this?
- If i rebind the grid in timer_tick event, the already selected row in the grid is lost. I need to retain the selected row and the previous sorting (user would have sorted the grid, also multiple sorting is allowed).
Help me to achieve this.
Regards,
Gayu
0
Hi,
Vlad
the Telerik team
You do not need to rebind the grid in case of items adding. As to the update you can use the replace approach instead. If you still do not want to do this you can simply copy in a local variable the grid SelectedItem and restore it after rebind.
All the best,Vlad
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF