I have a RadGridView hosted with a RadPane. The GridView uses a row style to highlight those rows where "IsSelected" is true however whenever any panes are added to the RadPaneGroup or the docking of any Pane (including the pane with the GridView) is changed, all of the "Selected" checkboxes are set to False and the formatting is lost.
Selecting another record from the master grid then selecting the original record resets the formatting.
The following defines the DocumentHost, RadPaneGroups and RadPanes;
The attached shows;
Selecting another record from the master grid then selecting the original record resets the formatting.
The following defines the DocumentHost, RadPaneGroups and RadPanes;
<telerik:RadDocking Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Name="rdContent" Margin="5,2" MaxWidth="5000" MaxHeight="5000" telerik:StyleManager.Theme="Office_Blue"> <telerik:RadDocking.DocumentHost> <telerik:RadSplitContainer x:Name="rcsContent" InitialPosition="DockedLeft"> <telerik:RadPaneGroup x:Name="rpgContent"> <telerik:RadPane x:Name="rpProcesses" Header="Well Processes"> <telerik:RadGridView Name="gvProcesses" RowStyle="{StaticResource SelectedGrid}" Margin="5,2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" telerik:StyleManager.Theme="Office_Blue" AutoGenerateColumns="False" ShowColumnFooters="False" ShowGroupFooters="False" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" ItemsSource="{Binding}" DataLoadMode="Synchronous" CanUserDeleteRows="False" CanUserInsertRows="False" ToolTip="Select the Processes associated with the Well Stage record" UseLayoutRounding="True" Visibility="Visible" MinHeight="100" MaxHeight="250"> <telerik:RadGridView.Resources> <Style TargetType="ListBox"> <Setter Property="MaxHeight" Value="400" /> </Style> </telerik:RadGridView.Resources> <telerik:RadGridView.Columns> <telerik:GridViewCheckBoxColumn Header="Active" UniqueName="IsActive" DataMemberBinding="{Binding Path=IsActive}" IsReadOnly="True" Width="auto" TextAlignment="Center"> <telerik:GridViewCheckBoxColumn.CellStyle> <Style TargetType="telerik:GridViewCell"> <Setter Property="HorizontalContentAlignment" Value="Center" /> </Style> </telerik:GridViewCheckBoxColumn.CellStyle> </telerik:GridViewCheckBoxColumn> <telerik:GridViewDataColumn Header="Select" UniqueName="Selected" DataMemberBinding="{Binding Path=IsSelected}" IsReadOnly="False" Width="auto"> <telerik:GridViewDataColumn.CellStyle> <Style TargetType="telerik:GridViewCell"> <Setter Property="HorizontalContentAlignment" Value="Center" /> </Style> </telerik:GridViewDataColumn.CellStyle> <!-- See http://www.telerik.com/help/wpf/gridview-checkbox-column-clicks.html for info on enabling single-click editing of checkboxes --> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding Path=IsSelected, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" telerik:StyleManager.Theme="Office_Blue" Click="Process_Clicked" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Process" UniqueName="Process" DataMemberBinding="{Binding Path=Process}" IsReadOnly="True" Width="auto" /> <telerik:GridViewDataColumn Header="Notes" UniqueName="Notes" IsReadOnly="True" Width="*"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=Notes, Converter={StaticResource RemoveNewLine}}" HorizontalAlignment="Left" TextTrimming="CharacterEllipsis" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView> </telerik:RadPane> <telerik:RadPane x:Name="rpRigClasses" Header="Rig Classes"> <telerik:RadGridView Name="gvRigClasses" RowStyle="{StaticResource SelectedGrid}" Margin="5,2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" telerik:StyleManager.Theme="Office_Blue" AutoGenerateColumns="False" ShowColumnFooters="False" ShowGroupFooters="False" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" ItemsSource="{Binding}" DataLoadMode="Synchronous" CanUserDeleteRows="False" CanUserInsertRows="False" ToolTip="Select a Project record to edit" UseLayoutRounding="True" Visibility="Visible" MinHeight="100" MaxHeight="250"> <telerik:RadGridView.Resources> <Style TargetType="ListBox"> <Setter Property="MaxHeight" Value="400" /> </Style> </telerik:RadGridView.Resources> <telerik:RadGridView.Columns> <telerik:GridViewCheckBoxColumn Header="Active" UniqueName="IsActive" DataMemberBinding="{Binding Path=IsActive}" IsReadOnly="True" Width="auto" TextAlignment="Center"> <telerik:GridViewCheckBoxColumn.CellStyle> <Style TargetType="telerik:GridViewCell"> <Setter Property="HorizontalContentAlignment" Value="Center" /> </Style> </telerik:GridViewCheckBoxColumn.CellStyle> </telerik:GridViewCheckBoxColumn> <telerik:GridViewDataColumn Header="Select" UniqueName="Selected" DataMemberBinding="{Binding Path=IsSelected}" IsReadOnly="False" Width="auto"> <telerik:GridViewDataColumn.CellStyle> <Style TargetType="telerik:GridViewCell"> <Setter Property="HorizontalContentAlignment" Value="Center" /> </Style> </telerik:GridViewDataColumn.CellStyle> <!-- See http://www.telerik.com/help/wpf/gridview-checkbox-column-clicks.html for info on enabling single-click editing of checkboxes --> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <CheckBox IsChecked="{Binding Path=IsSelected, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" telerik:StyleManager.Theme="Office_Blue" Click="RigClass_Clicked" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Header="Rig Class" UniqueName="RigClass" DataMemberBinding="{Binding Path=RigClass}" IsReadOnly="True" Width="auto" /> <telerik:GridViewDataColumn Header="Notes" UniqueName="Notes" IsReadOnly="True" Width="*"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=Notes, Converter={StaticResource RemoveNewLine}}" HorizontalAlignment="Left" TextTrimming="CharacterEllipsis" /> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView> </telerik:RadPane> </telerik:RadPaneGroup> </telerik:RadSplitContainer> </telerik:RadDocking.DocumentHost></telerik:RadDocking>The attached shows;
- The initial display when a record is loaded.
- The screen after docking to the right.
- The screen after re-selecting the record.
The grid is bound to an ObservableCollection so I'm not sure why the "Selected" values would change.
Does anyone have any suggestions?