Hello Telerik,
We are developing and application using WPF and the MVVM design pattern.
We have a case where we've created a "dialog" to select a single value using the RadGridView where the result is selected from a nested RadGridView (the nested RadGridView's go only 1 level deep). You can see an example of our dialog in the attached screenshot.
The issue is a selection inconsistency. The issue is as follow:
a) Expand a row to reveal the embedded GridView, select a row from the embedded GridView making note of the specific cell clicked on the select the row.
b) Expand another row to reveal another embedded GridView and select a row from that embedded GridView.
c) Then try to reselect the row in "step a" by click on the exact same cell clicked on when selected the first time ... CANNOT SELECT THE ROW!
It appears that clicking on a row will still "select" the cell even though the GridView SelectionUnit is set to "FullRow". I'm assuming the solution is to prevent the cell selection altogether, but I can seem to find a solution.
Please see code below
Best Regards,
Roland
We are developing and application using WPF and the MVVM design pattern.
We have a case where we've created a "dialog" to select a single value using the RadGridView where the result is selected from a nested RadGridView (the nested RadGridView's go only 1 level deep). You can see an example of our dialog in the attached screenshot.
The issue is a selection inconsistency. The issue is as follow:
a) Expand a row to reveal the embedded GridView, select a row from the embedded GridView making note of the specific cell clicked on the select the row.
b) Expand another row to reveal another embedded GridView and select a row from that embedded GridView.
c) Then try to reselect the row in "step a" by click on the exact same cell clicked on when selected the first time ... CANNOT SELECT THE ROW!
It appears that clicking on a row will still "select" the cell even though the GridView SelectionUnit is set to "FullRow". I'm assuming the solution is to prevent the cell selection altogether, but I can seem to find a solution.
Please see code below
Best Regards,
Roland
<tgrid:RadGridView x:Name="radGridView" Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" Margin="6,0,6,6" VerticalAlignment="Stretch" IsReadOnly="True" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" ScrollMode="Deferred" ItemsSource="{Binding CollectionView.ItemsSource}" DataLoadMode="Asynchronous" IsFilteringAllowed="False" ShowGroupPanel="False" ShowColumnHeaders="True" EnableColumnVirtualization="False" CanUserResizeColumns="False" CanUserDeleteRows="False" AutoGenerateColumns="False" CanUserReorderColumns="False" IsScrolling="False" ShowInsertRow="False" ValidatesOnDataErrors="None" int:RadGridViewAdapter.SortDirection="{Binding CollectionView.SortDirection, Mode=TwoWay}" int:RadGridViewAdapter.SortMember="{Binding CollectionView.SortMember, Mode=TwoWay}" Grid.RowSpan="1" SelectionMode="Single" int:RadGridViewHierarchicalAdapter.HierarchicalAdapterEnabled="True" int:RadGridViewHierarchicalAdapter.HierarchicalSelectedItemsBinding="{Binding SelectedArticles}" int:RadGridViewHierarchicalAdapter.AutoSelectLowerLevel="True" SelectionUnit="FullRow">
<tgrid:RadGridView.Columns>
<tgrid:GridViewDataColumn Header="Title" Width="*" DataMemberBinding="{Binding Title}" IsFilterable="False" IsCustomSortingEnabled="False" IsGroupable="False" IsSortable="True" UniqueName="Title" TextTrimming="WordEllipsis" /> <tgrid:GridViewDataColumn Header="Brand" Width="*" DataMemberBinding="{Binding Brand}" IsFilterable="False" IsCustomSortingEnabled="False" IsGroupable="False" IsSortable="True" UniqueName="Brand" TextTrimming="WordEllipsis" /> <tgrid:GridViewDataColumn Header="Specification}" Width="*" DataMemberBinding="{Binding Specification}" IsFilterable="False" IsCustomSortingEnabled="False" IsGroupable="False" IsSortable="True" UniqueName="Specification" TextTrimming="WordEllipsis" ToolTip="{Binding Specification}" /> <tgrid:GridViewDataColumn Header="GroupKind}" Width="*" DataMemberBinding="{Binding Kind}" IsFilterable="False" IsCustomSortingEnabled="False" IsGroupable="False" IsSortable="True" UniqueName="Kind" TextTrimming="WordEllipsis" ToolTip="{Binding Kind}" /> </tgrid:RadGridView.Columns> <tgrid:RadGridView.ChildTableDefinitions> <tgrid:GridViewTableDefinition> <tgrid:GridViewTableDefinition.Relation> <Data:PropertyRelation ParentPropertyName="Articles" /> </tgrid:GridViewTableDefinition.Relation> </tgrid:GridViewTableDefinition> </tgrid:RadGridView.ChildTableDefinitions> <tgrid:RadGridView.HierarchyChildTemplate> <DataTemplate> <tgrid:RadGridView x:Name="radGridViewChild" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" ScrollMode="Deferred" ItemsSource="{Binding Articles}" IsFilteringAllowed="False" ShowGroupPanel="False" ShowColumnHeaders="True" EnableColumnVirtualization="False" CanUserResizeColumns="False" CanUserDeleteRows="False" AutoGenerateColumns="False" CanUserReorderColumns="False" IsScrolling="False" ShowInsertRow="False" ValidatesOnDataErrors="None" Grid.RowSpan="1" SelectionMode="Extended" SelectionUnit="FullRow"> <tgrid:RadGridView.Columns> <tgrid:GridViewDataColumn Header="Number" Width="Auto" DataMemberBinding="{Binding ArticleNumber}" IsFilterable="False" IsCustomSortingEnabled="False" IsGroupable="False" IsSortable="True" UniqueName="Number" /> <tgrid:GridViewDataColumn Header="TypeNumber" Width="Auto" DataMemberBinding="{Binding TypeNumber}" IsFilterable="False" IsCustomSortingEnabled="False" IsGroupable="False" IsSortable="True" UniqueName="TypeNumber" /> <tgrid:GridViewDataColumn Header="Description" Width="Auto" DataMemberBinding="{Binding ErpDescription}" IsFilterable="False" IsCustomSortingEnabled="False" IsGroupable="False" IsSortable="True" UniqueName="Description" /> </tgrid:RadGridView.Columns> </tgrid:RadGridView> </DataTemplate> </tgrid:RadGridView.HierarchyChildTemplate> <tgrid:RadGridView.ScrollPositionIndicatorTemplate> <DataTemplate> <TextBlock Text="{Binding Title}" FontWeight="Bold" /> </DataTemplate> </tgrid:RadGridView.ScrollPositionIndicatorTemplate>
</tgrid:RadGridView>