Hi,
We're using the inner grid feature of the GridView control quite heavily and have encoutered an odd problem:
Whenever the parent row's viewmodel fires a NotifyPropertyChanged event, the inner grid is completely redrawn. Since the inner grid's columns use fill width the whole inner grid flashes. Oddly enough, the parent row appear okay.
Any idea why this is happening and how to avoid it?
<telerik:RadGridView |
RowIndicatorVisibility="Hidden" |
AutoGenerateColumns="False" |
ShowGroupPanel="False" |
RowDetailsVisibilityMode="VisibleWhenSelected" |
Name="MainGrid" |
ItemsSource="{Binding Alerts}" |
ShowColumnHeaders="True" |
> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn Name="Headline" EditTriggers="None" |
DataMemberBinding="{Binding Headline,Mode=OneWay}" /> |
</telerik:RadGridView.Columns> |
<telerik:RadGridView.ChildTableDefinitions> |
<telerik:GridViewTableDefinition |
AutoGenerateFieldDescriptors="False" |
> |
<telerik:GridViewTableDefinition.Relation> |
<telerik:PropertyRelation |
ParentPropertyName="DescriptionLines" /> |
</telerik:GridViewTableDefinition.Relation> |
</telerik:GridViewTableDefinition> |
</telerik:RadGridView.ChildTableDefinitions> |
<telerik:RadGridView.HierarchyChildTemplate> |
<DataTemplate> |
<Grid> |
<telerik:RadGridView |
RowIndicatorVisibility="Hidden" |
AutoGenerateColumns="False" |
ShowGroupPanel="False" |
RowDetailsVisibilityMode="Collapsed" |
ShowColumnHeaders="True" |
ItemsSource="{Binding DescriptionLines}" |
ScrollViewer.HorizontalScrollBarVisibility="Hidden" |
RowLoaded="ChildGridView_RowLoaded" |
ColumnsWidthMode="Fill" |
Margin="10,10,10,10" |
> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn |
Header="Device Name" |
MaxWidth="300" |
EditTriggers="None" |
> |
<telerik:GridViewDataColumn.CellTemplate> |
<DataTemplate> |
<ContentPresenter Content="{Binding AssociatedViewModel}" /> |
</DataTemplate> |
</telerik:GridViewDataColumn.CellTemplate> |
</telerik:GridViewDataColumn> |
<telerik:GridViewDataColumn |
Header="Description" |
DataMemberBinding="{Binding Description}" |
TextWrapping="Wrap" |
EditTriggers="None" |
/> |
<telerik:GridViewDataColumn |
Header="" |
MaxWidth="100" |
EditTriggers="None" |
> |
<telerik:GridViewDataColumn.CellTemplate> |
<DataTemplate> |
<!-- This contains a RadDropDownButton, I've cut it out now --> |
</DataTemplate> |
</telerik:GridViewDataColumn.CellTemplate> |
</telerik:GridViewDataColumn> |
</telerik:RadGridView.Columns> |
</telerik:RadGridView> |
</Grid> |
</DataTemplate> |
</telerik:RadGridView.HierarchyChildTemplate> |
</telerik:RadGridView> |
Thanks,
yonadav