This question is locked. New answers and comments are not allowed.
Hi,
I am using RadGridView, whose header contains a ComboBox. I want to be able to set the selected index of the combobox from code behind (let's say when the data is bound to the grid). Please tell me how to do this.
I am using RadGridView, whose header contains a ComboBox. I want to be able to set the selected index of the combobox from code behind (let's say when the data is bound to the grid). Please tell me how to do this.
<telerik:RadGridView x:Name="radGridView" ItemsSource="{Binding PagedSource, ElementName=radDataPager}" Grid.ColumnSpan="2" AutoGenerateColumns="False" ShowColumnFooters="True" > <telerik:RadGridView.Columns> <telerik:GridViewDataColumn IsFilterable="False" Footer="Total" Width="115" > <telerik:GridViewColumn.Header> <telerik:RadComboBox x:Name="radComboBox" Width="112" SelectionChanged="radComboBox_SelectionChanged"> <telerik:RadComboBoxItem Content="Material" /> <telerik:RadComboBoxItem Content="Product Group"/> </telerik:RadComboBox> </telerik:GridViewColumn.Header> <telerik:GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Category}" TextAlignment="Right" ToolTipService.ToolTip="{Binding Category}"></TextBlock> </DataTemplate> </telerik:GridViewColumn.CellTemplate> </telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView>