The following is the code snippet from my code. I have the command CheckTypeCommand defined in my Model. There are over 100,000 items in my collection and the number of columns is 50 odd. If I scroll up or down of this grid the command of this check box for every row that is render is getting executed. I want the command only to execute on UI trigger that is when I change the Check Type in the combobox. Can you please let me know what is I am missing here. If I disable Virtualization then the performance goes for a spin.
<
telerik:RadGridView
x:Name
=
"radGridView"
ItemsSource
=
"{Binding myList}"
AutoGenerateColumns
=
"False"
Grid.Row
=
"3"
Grid.ColumnSpan
=
"2"
FontSize
=
"11"
SelectionMode
=
"Single"
SelectionUnit
=
"Mixed"
ClipboardCopyMode
=
"Default"
ActionOnLostFocus
=
"CommitEdit"
ScrollMode
=
"RealTime"
ElementExporting
=
"radGridView_ElementExporting"
SelectedItem
=
"{Binding Data.GridSelectedRow, Source={StaticResource proxy} , Mode=TwoWay}"
IsSynchronizedWithCurrentItem
=
"False"
ShowColumnSortIndexes
=
"True"
RowIndicatorVisibility
=
"Collapsed"
behaviours:ContextMenuBehavior.ContextMenu
=
"{Binding ElementName=GridContextMenu}"
FrozenColumnCount
=
"3"
>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
x:Name
=
"GridContextMenu"
ItemsSource
=
"{Binding ContextMenu}"
ItemContainerStyle
=
"{StaticResource MenuItemContainer}"
>
</
telerik:RadContextMenu
>
<
telerik:GridViewDataColumn
x:Name
=
"checktypecombo"
DataMemberBinding
=
"{Binding CheckType, Mode=TwoWay}"
UniqueName
=
"CheckType"
IsReadOnlyBinding
=
"{Binding IsReadOnly}"
IsReadOnly
=
"True"
SortMemberPath
=
"CheckType"
EditTriggers
=
"CellClick"
IsFilterable
=
"False"
IsGroupable
=
"False"
IsSortable
=
"False"
Width
=
"75"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Check Type"
TextWrapping
=
"Wrap"
Style
=
"{StaticResource TextBlockWhite}"
/>
</
telerik:GridViewDataColumn.Header
>
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
telerik:RadComboBox
Command
=
"{Binding CheckTypeChanged}"
SelectedValue
=
"{Binding CheckType, Mode=OneWay}"
SelectedValuePath
=
"Tag"
IsEditable
=
"False"
>
<
telerik:RadComboBoxItem
Tag
=
"C1"
Content
=
"Checktype1"
/>
<
telerik:RadComboBoxItem
Tag
=
"C2"
Content
=
"C2"
/>
</
telerik:RadComboBox
>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
</telerik:RadGridView
<telerik:RadGridView x:Name="radGridView" ItemsSource="{Binding myList}" AutoGenerateColumns="False"
Grid.Row="3" Grid.ColumnSpan="2" FontSize="11" EnableColumnVirtualization="False"
SelectionMode="Single" SelectionUnit="Mixed"
ClipboardCopyMode="Default"
ActionOnLostFocus="CommitEdit" ScrollMode="RealTime" ElementExporting="radGridView_ElementExporting"
SelectedItem="{Binding Data.GridSelectedRow, Source={StaticResource proxy} , Mode=TwoWay}" IsSynchronizedWithCurrentItem="False"
ShowColumnSortIndexes="True" RowIndicatorVisibility="Collapsed" behaviours:ContextMenuBehavior.ContextMenu="{Binding ElementName=GridContextMenu}" FrozenColumnCount="3" >
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu x:Name="GridContextMenu" ItemsSource="{Binding ContextMenu}" ItemContainerStyle="{StaticResource MenuItemContainer}" >
</telerik:RadContextMenu>
<telerik:GridViewDataColumn x:Name="checktypecombo" DataMemberBinding="{Binding CheckType, Mode=TwoWay}"
UniqueName="CheckType" IsReadOnlyBinding="{Binding IsReadOnly}" IsReadOnly="True"
SortMemberPath="CheckType" EditTriggers="CellClick" IsFilterable="False" IsGroupable="False"
IsSortable="False" Width="75">
<telerik:GridViewDataColumn.Header>
<TextBlock Text="Check Type" TextWrapping="Wrap" Style="{StaticResource TextBlockWhite}" />
</telerik:GridViewDataColumn.Header>
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<telerik:RadComboBox Command="{Binding CheckTypeChanged}"
SelectedValue="{Binding CheckType, Mode=OneWay}" SelectedValuePath="Tag"
IsEditable="False">
<telerik:RadComboBoxItem Tag="C1" Content="Checktype1"/>
<telerik:RadComboBoxItem Tag="C2" Content="C2"/>
</telerik:RadComboBox>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewDataColumn>
</telerik:RadGridView