I want to catch the DataGridComboBoxcolumn SelectionChanged event in WinUI3 (Community Toolkit DataGrid).
In WPF, there is a solution like below by using EventSetter. But I cannot find an alternative in WinUI3.
<DataGridComboBoxColumn x:Name="Whatever">
<DataGridComboBoxColumn.EditingElementStyle>
<Style TargetType="{x:Type ComboBox}">
<EventSetter Event="SelectionChanged" Handler="SomeSelectionChanged" />
</Style>
</DataGridComboBoxColumn.EditingElementStyle>
</DataGridComboBoxColumn>
[WPF EventSetter] WPF datagrid combobox column: how to manage event of selection changed?
I want to know how to do something like WPF EventSetter in WinUI3.
I am afraid there is no equivalent of a WPF
EventSetterin WinUI.But you could replace the
DataGridComboBoxColumnwith aDataGridTemplateColumnand explicitly add aComboBoxwith an event handler to itsCellEditingTemplate.