Hi,
We have a rather large application that we are developing that has a couple of RadGridView's that are bound to an ObservableCollection of data objects. The grid view's have one particular column that is comprised of a custom cell template. Please see the code snippet at the bottom. In my specific case, I have a column of cells that contain progress bars that are moving based on a timer.
The issue is that whenever the table gets an update due to a data change or even in the case when a user tries to sort the table by clicking on a column header, the contents of the custom cell is unloaded and reloaded - every update... So, in my scenario, the progress bars just get reset because of the unload/load....
I tried to reproduce the problem with a small sample application but as I would expect, when I sort the grid view, the custom cell contents are not loaded and unloaded every time. When I make an update to particular row only that row receives the unloaded & loaded events. This makes sense.
Is there anything related to binding or my visual hierarchy that could be causing this? Or something else???
Thanks!
<
telerik:GridViewDataColumn
Header
=
"State"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Vertical"
>
<
TextBlock
HorizontalAlignment
=
"Center"
Text
=
"{Binding state}"
FontSize
=
"10"
/>
<
local:StateProgressBar
x:Name
=
"stateProgressBar"
DataContext
=
"{Binding}"
Loaded
=
"OnStateProgressBarLoadedHandler"
Unloaded
=
"stateProgressBar_Unloaded"
/>
</
StackPanel
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>