Hello
I created a GridViewDataColumn set with a ComboBoxEditorSetting.
What I'd like to do is when my grid gets the focus, I want the first cell of the first row (wich is my ComboBox) to enter in edit mode and I want to set the IsDropDownOpen property to true.
I've managed the first part, but I'm getting stucked with the second one (I can't get the RadComboBox in the GridViewCell)
Here's what I've wrote from a piece of code in this forum
I created a GridViewDataColumn set with a ComboBoxEditorSetting.
What I'd like to do is when my grid gets the focus, I want the first cell of the first row (wich is my ComboBox) to enter in edit mode and I want to set the IsDropDownOpen property to true.
I've managed the first part, but I'm getting stucked with the second one (I can't get the RadComboBox in the GridViewCell)
Here's what I've wrote from a piece of code in this forum
private void FormGrille_GotFocus(object sender, RoutedEventArgs e) | |
{ | |
FormGrille.GotFocus -=new RoutedEventHandler(FormGrille_GotFocus); | |
DataRecord record = (DataRecord)this.FormGrille.Records[0]; | |
var element = (GridViewRow)this.FormGrille.ItemsControl.ItemsGenerator.GenerateItemAtIndex(record.DataSourceIndex); | |
((GridViewCell)element.Items[0]).IsInEditMode = true; | |
} |