Hello
I need a racombobox with checkbox with multiselect and "select all" option, so I used the example from this thread : https://www.telerik.com/forums/radcombobox-with-checkbox-with-multi-select-(using-mvvm)
It works well, but I need it into a radgridview which could have a scrollbar and in this case I got an excepetion when I use the scroll of the radgridview.
It's fire the event OnSelectedItemsPropertyChanged change and so the sub Transfer is called but as the collection changed the Transfer sub crach.
I tried to put the radcombobox into a stack panel in order to prevent firing of event but it doesn't work :(
Here the code :
<
telerik:RadGridView
Margin
=
"6,10,6,32.96"
ShowGroupPanel
=
"False"
RowIndicatorVisibility
=
"Collapsed"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
CanUserResizeColumns
=
"True"
CanUserSortColumns
=
"False"
CanUserDeleteRows
=
"False"
CanUserInsertRows
=
"False"
ItemsSource
=
"{Binding Rules}"
SelectedItem
=
"{Binding SelectedRule}"
IsReadOnly
=
"{Binding OnlyRead}"
AutoGenerateColumns
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Jib Geometry"
Width
=
"100"
>
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
StackPanel
>
<
telerik:RadComboBox
ItemsSource
=
"{Binding JibGeometryDataContexts}"
Margin
=
"5,0,0,0"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
Height
=
"22"
AllowMultipleSelection
=
"True"
EmptyText
=
"Select jib geometry"
Grid.Column
=
"1"
IsEditable
=
"False"
ItemTemplate
=
"{StaticResource MultiSelectComboTemplate}"
Style
=
"{StaticResource CheckBoxRadComboBox}"
MultipleSelectionBoxTemplate
=
"{StaticResource MultiSelectedBoxTemplate}"
DropDownClosed
=
"RadComboBox_DropDownClosed"
>
<
i:Interaction.Behaviors
>
<
combobox:SelectedItemsBehavior
SelectedItems
=
"{Binding SelectedJibGeometryDataContexts}"
/>
</
i:Interaction.Behaviors
>
</
telerik:RadComboBox
>
</
StackPanel
>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
...
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
crash on :
Public
Shared
Sub
Transfer(
ByVal
source
As
IList,
ByVal
target
As
IList)
If
source
Is
Nothing
OrElse
target
Is
Nothing
Then
Return
target.Clear()
For
Each
o
In
source
target.Add(o)
Next
End
Sub
Do you have any Idea to fix these crashes ?
Thanks
Regards
J-Christophe