Hello,
I am trying to use a CheckedComboBoxEdit in the following way:
In the initialize-method I initialize the DataSource-table for the CheckedComboBoxEdit in the following way:
C#public Editor()
{
Worksteps = new XPCollection<T3_Workstep>(editorSession);
Worksteps.Sorting.Add(new SortProperty("Workstep", SortingDirection.Ascending)); // Workstep = int
cbWorkstep_IDNos.Properties.ValueMember = "IDNo"; // IDNo = bigint
cbWorkstep_IDNos.Properties.DisplayMember = "Name"; // Name = nvarchar(256)
cbWorkstep_IDNos.Properties.DataSource = Worksteps;
}
Then I connect the "Worksteps"-table to the CheckedComboBoxEdit cbWorkstep_IDNos:
C#protected override void CreateDataBindings(DevExpress.Xpo.XPBaseObject focusedObject, bool pkEditable = false)
{
T3_Machine Machine = focusedObject as T3_Machine;
cbWorkstep_IDNos.DataBindings.Clear();
cbWorkstep_IDNos.Properties.DataSource = null;
cbWorkstep_IDNos.Properties.DataSource = Worksteps;
cbWorkstep_IDNos.SetEditValue(-1);
SetDataBinding(cbWorkstep_IDNos, "EditValue", Machine, "Workstep_IDNos"); // Workstep_IDNos = nvarchar(256)
}
If I look into cbWorkstep_IDNos I see the IDNos (See: devexpress - After starting.png). But I expected the Names of the IDNos. If I then open and close the CheckedComboBoxEdit cbWorkstep_IDNos I see the Names out of T3_Workstep.
What am I doing wrong?
Thanks in advance for a quick responce.
Regards,
Andreas Voßhenrich