I am using the RadGridView, and I need to subscribe to cell edit event of RADGrid. I get this event for every default cell however I am facing issue when I apply custom template to Combobox column.
Details:
I have two columns, viz. GridViewDataColumn and GridViewComboBoxColumn. I am applying custom CellTemplate to GridViewComboBoxColumn to have the default edit behaviour, but the grid cell edit event is not firing when I change the item in the combobox. I suspect this might be because I have overriden cell template. Event fires up without any issue if I use default GridViewComboBoxColumn without applying custom template.
Reason for using custom template: On default view, I want to display arrow on cell when it combo box column. Default behavior of GridViewComboBoxColumn does not display arrow, it shows arrow when you click on cell, then cell turns into combo box.
Please let me know how can I get cell edit event on custom template that I have applied on GridViewComboBoxColumn.
<
TelerikGridView:RadGridView
x:Name
=
"PersonData"
SelectedItem
=
"{Binding Path=SelectedPersonItem, Mode=TwoWay}"
Width
=
"Auto"
AutoGenerateColumns
=
"False"
ItemsSource
=
"{Binding Path=PersonCollection,Mode=TwoWay}"
PreparingCellForEdit
=
"CellDataChanged"
>
<
TelerikGridView:RadGridView.Columns
>
<
TelerikGridView:GridViewDataColumn
DataMemberBinding
=
"{Binding Path=Name, Mode=TwoWay}"
Header
=
"Sample Name"
Width
=
"*"
/>
<
TelerikGridView:GridViewComboBoxColumn
Header
=
"Department"
Width
=
"*"
ItemsSource
=
"{Binding Path=Departments, Mode=TwoWay, Source={StaticResource PersonViewModel}}"
DataMemberBinding
=
"{Binding Path=DepartmentName, Mode=TwoWay}"
>
<
TelerikGridView:GridViewComboBoxColumn.CellTemplate
>
<
DataTemplate
>
<
StackPanel
>
<
telerik:RadComboBox
Name
=
"displayCombo12"
ItemsSource
=
"{Binding Path=Departments, Mode=TwoWay, Source={StaticResource PersonViewModel}}"
SelectedValue
=
"{Binding DepartmentName, Mode=TwoWay}"
>
</
telerik:RadComboBox
>
</
StackPanel
>
</
DataTemplate
>
</
TelerikGridView:GridViewComboBoxColumn.CellTemplate
>
</
TelerikGridView:GridViewComboBoxColumn
>
</
TelerikGridView:RadGridView.Columns
>
</
TelerikGridView:RadGridView
>
Thanks,
Rakesh K