This question is locked. New answers and comments are not allowed.
Hello,
I want to insert a GridViewComboBoxColumn from the Code behind. But I want it to bind to the SelectedIndex not the SelectedValue. How can I manage that?
My code
I want to insert a GridViewComboBoxColumn from the Code behind. But I want it to bind to the SelectedIndex not the SelectedValue. How can I manage that?
My code
List<string> listtype = new List<string>();listtype .Add("A"); listtype .Add("B"); listtype .Add("V"); e.Column.IsVisible = false; radGridView1.Columns.Remove(e.Column); GridViewComboBoxColumn column = new GridViewComboBoxColumn(); column.ItemsSource = listtype; column.UniqueName = e.Column.UniqueName; column.DataType = typeof(short); column.DataMemberBinding = new System.Windows.Data.Binding(e.Column.UniqueName); column.SelectedValueMemberPath = "Id"; radGridView1.Columns.Add(column);