Hello,
I would like to use a Combobox in my GridView.
In-Code I do the following:
I would like to use a Combobox in my GridView.
In-Code I do the following:
RadComboBoxItem boxitem = new RadComboBoxItem();
boxitem.Tag = item.ID;
boxitem.Content = item.Name;
comboboxlist.Add(boxitem);
GridViewComboBoxColumn column = new GridViewComboBoxColumn();
System.Windows.Data.Binding bind = new System.Windows.Data.Binding("Name");
bind.Mode = System.Windows.Data.BindingMode.TwoWay;
column.UniqueName = "Name";
column.DisplayMemberPath = "Content";
column.SelectedValueMemberPath = "Tag";
column.ItemsSource = comboboxlist;
column.DataMemberBinding = bind;
radGridView1.Columns.Add(column);
radGridView1.ItemsSource = Sourcelist;
The Items are displayed according to "Content". But as soon as I select an item, the value is not shown in the ComboBox, it simply disappears, but stores the ID in the Variable. But when I set DisplayMemberPath to "Tag", it does not make any difference, the Content is shown.
How can I show "Content" and register "Tag" and then, when the "Tag" is pulled out the database again show the content?
Thank you
How can I show "Content" and register "Tag" and then, when the "Tag" is pulled out the database again show the content?
Thank you