Hi there,
I have in my Grid a GridViewComboBoxColumn and want to show there the Name of a type from the table which is shown in the grid.
This is the column:
This is how I fill the Names into the Combobox:
And this is the DataItem for the TypeNames (TypText):
The Combobox is filled correctly, but the Item to the number from table, will not be shown.
What do I have done wrong?
I have in my Grid a GridViewComboBoxColumn and want to show there the Name of a type from the table which is shown in the grid.
This is the column:
<telerik:GridViewComboBoxColumn Header="Typ" IsFilterable="False" IsGroupable="False" IsSortable="False" ShowDistinctFilters="False" UniqueName="Typ" DataMemberBinding="{Binding Typ}" />This is how I fill the Names into the Combobox:
private void FillTypItems() { List<TypItem> TypListe = new List<TypItem>(); TypItem _TypItem = new TypItem(); _TypItem.Typ = 1; _TypItem.TypText = "Ganzzahl"; TypListe.Add(_TypItem); _TypItem = new TypItem(); _TypItem.Typ = 2; _TypItem.TypText = "Dezimalzahl"; TypListe.Add(_TypItem); _TypItem = new TypItem(); _TypItem.Typ = 3; _TypItem.TypText = "Zeichenkette"; TypListe.Add(_TypItem); _TypItem = new TypItem(); _TypItem.Typ = 5; _TypItem.TypText = "Logisch"; TypListe.Add(_TypItem); ((GridViewComboBoxColumn)this.rgvUebergabeparameter.Columns["Typ"]).DisplayMemberPath = "TypText"; ((GridViewComboBoxColumn)this.rgvUebergabeparameter.Columns["Typ"]).ItemsSource = TypListe; }And this is the DataItem for the TypeNames (TypText):
public class TypItem { int _Typ; public int Typ { get { return _Typ; } set { _Typ = value; } } string _TypText; public string TypText { get { return _TypText; } set { _TypText = value; } } }The Combobox is filled correctly, but the Item to the number from table, will not be shown.
What do I have done wrong?