Hello,
I have a GridView in the DataTemplate of a TreeListView. Sometimes (quite often) the SelectedItem event of the GridView is not fired. I can see that the items are visually correctly selected but sometimes only the SelectedItem event of the TreeListView is fired (checked by an output within both SelectedItem properties).
Best Regards
Raul
I have a GridView in the DataTemplate of a TreeListView. Sometimes (quite often) the SelectedItem event of the GridView is not fired. I can see that the items are visually correctly selected but sometimes only the SelectedItem event of the TreeListView is fired (checked by an output within both SelectedItem properties).
Best Regards
Raul
<
UserControl
x:Class
=
"PrimeTime.Views.Employees.EmployeeWorkdayErrorSelectionView"
xmlns:scm
=
"clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:i
=
"clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
mc:Ignorable
=
"d"
Height
=
"504"
Width
=
"400"
>
<
UserControl.Resources
>
<
ResourceDictionary
>
<
DataTemplate
x:Key
=
"ErrorWorkdaysTemplate"
>
<
telerik:RadGridView
ItemsSource
=
"{Binding WorkdayErrors}"
EnableRowVirtualization
=
"False"
IsReadOnly
=
"True"
SelectionMode
=
"Single"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"False"
ShowColumnHeaders
=
"False"
ScrollViewer.HorizontalScrollBarVisibility
=
"Disabled"
CanUserInsertRows
=
"False"
CanUserDeleteRows
=
"False"
CanUserSortColumns
=
"False"
IsSynchronizedWithCurrentItem
=
"True"
IsFilteringAllowed
=
"False"
SelectedItem
=
"{Binding SelectedWorkdayError, Mode=TwoWay}"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding WorkdayDate}"
Header
=
"Day"
Width
=
"70"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding ErrorMessage}"
Header
=
"Error"
Width
=
"Auto"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
DataTemplate
>
</
ResourceDictionary
>
</
UserControl.Resources
>
<
telerik:RadTreeListView
x:Name
=
"tlv_EmployeeSelection"
EnableRowVirtualization
=
"False"
ItemsSource
=
"{Binding Childs}"
AutoGenerateColumns
=
"False"
AutoExpandItems
=
"True"
IsReadOnly
=
"True"
RowDetailsVisibilityMode
=
"VisibleWhenSelected"
SelectionMode
=
"Single"
IsFilteringAllowed
=
"False"
CanUserDeleteRows
=
"False"
CanUserInsertRows
=
"False"
RowDetailsTemplate
=
"{StaticResource ErrorWorkdaysTemplate}"
SelectedItem
=
"{Binding SelectedItem, Mode=TwoWay}"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Childs}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
UniqueName
=
"Name"
DataMemberBinding
=
"{Binding Name}"
Header
=
"Name"
Width
=
"*"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding PersonnelNumber}"
Header
=
"Number"
Width
=
"70"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
</
UserControl
>