TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gorak Khule
NA
27
1.8k
WPF DataGrid with Expander perfomance issue on some machine.
Mar 15 2019 5:13 AM
Hi Team,
I am facing performance issue for DataGrid with expander on some machines and its working fine on some machines. I have used expander and group by in datagrid but for some machine working so is there any system dependencies.Actually performance issue with kyeboard type no any database connectivity and any c# events only keyboard and mouse click only in datagrid other page is working fine.Please help.
<
DataGrid
Grid.Row
=
"1"
ColumnWidth
=
"*"
HorizontalAlignment
=
"Left"
AutoGenerateColumns
=
"False"
RowHeaderWidth
=
"0"
CanUserAddRows
=
"False"
x:Name
=
"gdChannelElement"
CanUserDeleteRows
=
"False"
ItemsSource
=
"{Binding Path=LstChannelElementModel}"
CanUserSortColumns
=
"True"
HorizontalScrollBarVisibility
=
"Auto"
VerticalScrollBarVisibility
=
"Auto"
CurrentItem
=
"{Binding SelectedChannelElement}"
SelectedItem
=
"{Binding SelectedChannelElement}"
Grid.ColumnSpan
=
"2"
IsReadOnly
=
"{Binding Path= ChannelModel.IsReadOnly, UpdateSourceTrigger=PropertyChanged}"
>
<
DataGrid.Columns
>
<
DataGridTemplateColumn
Header
=
"Title *"
MinWidth
=
"180"
Width
=
"Auto"
SortMemberPath
=
"Name"
>
<
DataGridTemplateColumn.HeaderTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"Name *"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.HeaderTemplate
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
TextBox
Text
=
"{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}"
MaxLength
=
"40"
x:Name
=
"test"
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
>
</
TextBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
</
DataGridTemplateColumn
>
<
DataGridTemplateColumn
Header
=
"Element Sub Type"
MinWidth
=
"170"
Width
=
"Auto"
SortMemberPath
=
"ElementSubType"
>
<
DataGridTemplateColumn.HeaderTemplate
>
<
DataTemplate
>
<
StackPanel
Style
=
"{DynamicResource LOVStack}"
>
<
TextBlock
Text
=
"Element Sub Type *"
/>
<
Image
Source
=
"pack://application:,,,/Phoenix.CommonResources;component/Images/blueArrow.png"
Style
=
"{DynamicResource LOVImage}"
>
</
Image
>
</
StackPanel
>
</
DataTemplate
>
</
DataGridTemplateColumn.HeaderTemplate
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=ElementSubType, ValidatesOnDataErrors=True}"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
TextBox
Text
=
"{Binding Path=ElementSubType, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}"
x:Name
=
"test"
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"PreviewKeyDown"
>
<
mvvmEvent:EventToCommand
Command
=
"{Binding DataContext.ElementSubTypePreviewKeyDownCommand,Mode=OneWay,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}"
PassEventArgsToCommand
=
"True"
>
</
mvvmEvent:EventToCommand
>
</
i:EventTrigger
>
<
i:EventTrigger
EventName
=
"LostFocus"
>
<
mvvmEvent:EventToCommand
Command
=
"{Binding DataContext.ElementSubTypeLostFocusCommand,Mode=OneWay,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}"
PassEventArgsToCommand
=
"True"
>
</
mvvmEvent:EventToCommand
>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
TextBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
<
DataGridTemplateColumn.CellStyle
>
<
Style
TargetType
=
"{x:Type DataGridCell}"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding HasElementSubType}"
Value
=
"true"
>
<
Setter
Property
=
"IsHitTestVisible"
Value
=
"True"
/>
<
Setter
Property
=
"IsTabStop"
Value
=
"True"
/>
</
DataTrigger
>
<
DataTrigger
Binding
=
"{Binding HasElementSubType}"
Value
=
"false"
>
<
Setter
Property
=
"IsHitTestVisible"
Value
=
"False"
/>
<
Setter
Property
=
"IsTabStop"
Value
=
"False"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
DataGridTemplateColumn.CellStyle
>
</
DataGridTemplateColumn
>
<!-- PHX-EN-803 Start -->
<
DataGridTemplateColumn
MinWidth
=
"70"
Header
=
"Position"
SortMemberPath
=
"Position"
IsReadOnly
=
"{Binding IsPositionReadOnly}"
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Position,ValidatesOnDataErrors=True,ValidatesOnExceptions=True}"
Style
=
"{DynamicResource TblGridClass}"
>
</
TextBlock
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
ComboBox
Name
=
"cmbPosition"
MaxWidth
=
"70"
ItemsSource
=
"{Binding PositionDropDownList}"
HorizontalAlignment
=
"Stretch"
Margin
=
"0"
DisplayMemberPath
=
"Value1"
SelectedValuePath
=
"ID"
SelectedValue
=
"{Binding PositionId,UpdateSourceTrigger=PropertyChanged}"
Text
=
"{Binding Position,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnExceptions=True}"
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
>
</
ComboBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
<
DataGridTemplateColumn.CellStyle
>
<
Style
TargetType
=
"{x:Type DataGridCell}"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding IsPositionReadOnly}"
Value
=
"true"
>
<
Setter
Property
=
"IsEnabled"
Value
=
"False"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
DataGridTemplateColumn.CellStyle
>
</
DataGridTemplateColumn
>
<
DataGridTemplateColumn
Header
=
"Break"
MinWidth
=
"70"
SortMemberPath
=
"Break"
IsReadOnly
=
"{Binding Path= ChannelElementModel.IsReadOnlyBreak, UpdateSourceTrigger=PropertyChanged}"
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=Break,ValidatesOnDataErrors=True,ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
TextBox
Width
=
"50"
IsReadOnly
=
"{Binding Path= ChannelElementModel.IsReadOnlyBreak, UpdateSourceTrigger=PropertyChanged}"
Text
=
"{Binding Break,ValidatesOnDataErrors=True,ValidatesOnExceptions=True,UpdateSourceTrigger=PropertyChanged}"
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
MaxLength
=
"20"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"PreviewKeyDown"
>
<
mvvmEvent:EventToCommand
Command
=
"{Binding DataContext.ChannelBreakPreviewKeyDownCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}}"
PassEventArgsToCommand
=
"True"
/>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
TextBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
<
DataGridTemplateColumn.CellStyle
>
<
Style
TargetType
=
"{x:Type DataGridCell}"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding IsReadOnlyBreak}"
Value
=
"true"
>
<
Setter
Property
=
"IsEnabled"
Value
=
"False"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
DataGridTemplateColumn.CellStyle
>
</
DataGridTemplateColumn
>
<!-- PHX-EN-803 End -->
<
DataGridTemplateColumn
Header
=
"Media Id *"
MinWidth
=
"150"
Width
=
"Auto"
SortMemberPath
=
"MediaId"
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=MediaId, ValidatesOnDataErrors=True}"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
TextBox
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
MaxLength
=
"32"
Text
=
"{Binding MediaId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"LostFocus"
>
<
mvvmEvent:EventToCommand
Command
=
"{Binding DataContext.MediaIdLostFocus,Mode=OneWay,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}"
PassEventArgsToCommand
=
"True"
>
</
mvvmEvent:EventToCommand
>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
TextBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
</
DataGridTemplateColumn
>
<!-- PHX-EN-803_Configuration of Channel Elements for Days Start -->
<
mvvmEvent:DataGridDateColumn
Header
=
"Applicable Days"
Width
=
"auto"
MinWidth
=
"100"
>
<
mvvmEvent:DataGridDateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Style
=
"{DynamicResource TblGridClass}"
>
<
Hyperlink
IsEnabled
=
"{Binding IsApplicableDaysEnable}"
Command
=
"{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGrid}}, Path=DataContext.ChannelGridDaysSelectCommand}"
>
View
</
Hyperlink
>
</
TextBlock
>
</
DataTemplate
>
</
mvvmEvent:DataGridDateColumn.CellTemplate
>
</
mvvmEvent:DataGridDateColumn
>
<!-- PHX-EN-803_Configuration of Channel Elements for Days End -->
<
DataGridTemplateColumn
Header
=
"Duration *"
MinWidth
=
"110"
Width
=
"Auto"
SortMemberPath
=
"Duration"
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=Duration, ValidatesOnDataErrors=True}"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
wpftoolkit:MaskedTextBox
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
Style
=
"{DynamicResource DurationGridTextBoxClass}"
Mask
=
"00:00:00:00"
Grid.Row
=
"2"
Grid.Column
=
"5"
Text
=
"{Binding Duration, Mode=TwoWay, UpdateSourceTrigger=LostFocus,ValidatesOnDataErrors=True}"
>
</
wpftoolkit:MaskedTextBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
</
DataGridTemplateColumn
>
<
mvvmEvent:DataGridDateColumn
Header
=
"Start Date *"
MinWidth
=
"150"
Width
=
"Auto"
SortMemberPath
=
"StartDate"
>
<
mvvmEvent:DataGridDateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=StartDate,StringFormat= 'dd-MMM-yyyy', ValidatesOnDataErrors=True }"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
mvvmEvent:DataGridDateColumn.CellTemplate
>
<
mvvmEvent:DataGridDateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
DatePicker
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
x:Name
=
"dtStartDate"
SelectedDate
=
"{Binding Path=StartDate, StringFormat='dd-MMM-yyyy', Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"LostFocus"
>
<
mvvmEvent:EventToCommand
Command
=
"{Binding DataContext.StartDateLostFocusCommand,Mode=OneWay,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}"
PassEventArgsToCommand
=
"True"
>
</
mvvmEvent:EventToCommand
>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
DatePicker
>
</
DataTemplate
>
</
mvvmEvent:DataGridDateColumn.CellEditingTemplate
>
</
mvvmEvent:DataGridDateColumn
>
<
mvvmEvent:DataGridDateColumn
Header
=
"End Date *"
MinWidth
=
"150"
Width
=
"Auto"
SortMemberPath
=
"EndDate"
>
<
mvvmEvent:DataGridDateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=EndDate,StringFormat= 'dd-MMM-yyyy', ValidatesOnDataErrors=True }"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
mvvmEvent:DataGridDateColumn.CellTemplate
>
<
mvvmEvent:DataGridDateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
DatePicker
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
SelectedDate
=
"{Binding Path=EndDate, StringFormat='dd-MMM-yyyy', Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True}"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"LostFocus"
>
<
mvvmEvent:EventToCommand
Command
=
"{Binding DataContext.EndDateLostFocusCommand,Mode=OneWay,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type DataGrid}}}"
PassEventArgsToCommand
=
"True"
>
</
mvvmEvent:EventToCommand
>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
DatePicker
>
</
DataTemplate
>
</
mvvmEvent:DataGridDateColumn.CellEditingTemplate
>
</
mvvmEvent:DataGridDateColumn
>
<
DataGridTemplateColumn
Header
=
"Start Time"
MinWidth
=
"80"
Width
=
"Auto"
SortMemberPath
=
"StartTime"
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=StartTime,ValidatesOnDataErrors=True}"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
wpftoolkit:MaskedTextBox
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
Style
=
"{DynamicResource TimeGridTextBoxClass}"
Mask
=
"00:00:00"
Grid.Row
=
"2"
Grid.Column
=
"5"
Text
=
"{Binding StartTime, Mode=TwoWay, UpdateSourceTrigger=LostFocus,ValidatesOnDataErrors=True}"
>
</
wpftoolkit:MaskedTextBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
</
DataGridTemplateColumn
>
<
DataGridTemplateColumn
Header
=
"End Time"
MinWidth
=
"80"
Width
=
"Auto"
SortMemberPath
=
"EndTime"
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Path=EndTime,ValidatesOnDataErrors=True}"
Style
=
"{DynamicResource TblGridClass}"
/>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
wpftoolkit:MaskedTextBox
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
Style
=
"{DynamicResource TimeGridTextBoxClass}"
Mask
=
"00:00:00"
Grid.Row
=
"2"
Grid.Column
=
"5"
Text
=
"{Binding EndTime, Mode=TwoWay, UpdateSourceTrigger=LostFocus,ValidatesOnDataErrors=True}"
>
</
wpftoolkit:MaskedTextBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
</
DataGridTemplateColumn
>
<
DataGridTemplateColumn
Header
=
"Active"
MinWidth
=
"50"
Width
=
"Auto"
>
<
DataGridTemplateColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
HorizontalAlignment
=
"Center"
IsChecked
=
"{Binding Path=IsActive, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
>
</
CheckBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellTemplate
>
<
DataGridTemplateColumn.CellEditingTemplate
>
<
DataTemplate
>
<
CheckBox
HorizontalAlignment
=
"Center"
FocusManager.FocusedElement
=
"{Binding RelativeSource={RelativeSource Self}}"
IsChecked
=
"{Binding Path=IsActive, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
>
</
CheckBox
>
</
DataTemplate
>
</
DataGridTemplateColumn.CellEditingTemplate
>
</
DataGridTemplateColumn
>
<
DataGridTextColumn
Foreground
=
"Black"
MinWidth
=
"80"
Width
=
"Auto"
CellStyle
=
"{StaticResource MyDataGridCell}"
Header
=
"Captured On"
Binding
=
"{Binding Path=CapturedOn,StringFormat='dd-MMM-yyyy'}"
IsReadOnly
=
"True"
>
</
DataGridTextColumn
>
<
DataGridTextColumn
MinWidth
=
"250"
Width
=
"*"
Foreground
=
"Black"
Header
=
"Comments"
Binding
=
"{Binding Path=Comment, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
>
<
DataGridTextColumn.EditingElementStyle
>
<
Style
TargetType
=
"TextBox"
>
<
Setter
Property
=
"MaxLength"
Value
=
"120"
/>
<
Setter
Property
=
"CharacterCasing"
Value
=
"Upper"
/>
</
Style
>
</
DataGridTextColumn.EditingElementStyle
>
</
DataGridTextColumn
>
</
DataGrid.Columns
>
<
DataGrid.RowValidationErrorTemplate
>
<
ControlTemplate
>
</
ControlTemplate
>
</
DataGrid.RowValidationErrorTemplate
>
<
DataGrid.GroupStyle
>
<!-- Style for groups at top level. -->
<
GroupStyle
>
<
GroupStyle.HeaderTemplate
>
<
DataTemplate
>
<
StackPanel
>
<
TextBlock
Text
=
"{Binding Path=Name}"
FontWeight
=
"Bold"
Padding
=
"3"
/>
</
StackPanel
>
</
DataTemplate
>
</
GroupStyle.HeaderTemplate
>
<
GroupStyle.ContainerStyle
>
<
Style
TargetType
=
"{x:Type GroupItem}"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type GroupItem}"
>
<
Expander
IsExpanded
=
"{Binding IsExpanded1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
x:Name
=
"exptest"
Height
=
"Auto"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Stretch"
>
<
Expander.Header
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding Path=Name}"
/>
</
StackPanel
>
</
Expander.Header
>
<
ItemsPresenter
/>
</
Expander
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
GroupStyle.ContainerStyle
>
</
GroupStyle
>
</
DataGrid.GroupStyle
>
<
DataGrid.RowStyle
>
<
Style
TargetType
=
"{x:Type DataGridRow}"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding RecordStatus}"
Value
=
"Deleted"
>
<
Setter
Property
=
"Visibility"
Value
=
"Collapsed"
/>
</
DataTrigger
>
<
DataTrigger
Binding
=
"{Binding IsVisible}"
Value
=
"False"
>
<
Setter
Property
=
"Visibility"
Value
=
"Collapsed"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
DataGrid.RowStyle
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"PreviewKeyDown"
>
<
mvvmEvent:EventToCommand
Command
=
"{Binding ChannelElementPreviewKeyDownCommand,Mode=OneWay}"
PassEventArgsToCommand
=
"True"
>
</
mvvmEvent:EventToCommand
>
</
i:EventTrigger
>
<
i:EventTrigger
EventName
=
"GotKeyboardFocus"
>
<
mvvmEvent:EventToCommand
Command
=
"{Binding GridGotKeyboardFocus,Mode=OneWay}"
PassEventArgsToCommand
=
"True"
>
</
mvvmEvent:EventToCommand
>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
<
DataGrid.ContextMenu
>
<
ContextMenu
>
<
MenuItem
Click
=
"grdChannelElement_rightClick"
Header
=
"Export To Excel"
/>
</
ContextMenu
>
</
DataGrid.ContextMenu
>
</
DataGrid
>
</
Grid
>
Reply
Answers (
1
)
Add an expand All or collapse all button to the parentheader
Binding "SelectedItems" of a Listbox