I am using a WinCombo on a Windows form. The Combo is bound to a table that has three fields.
ID, Value, Description.
The DisplayMember is Description. The ValueMember is ID. When I choose one of the entries in the drop down, how can I get the "Value" field?
Thanks
I found it. I musta had brain damage.
cmbIndex.ActiveRow.Cells("Val").Value
Oops.
Hello,
As an alternative, you can also use:
cmbIndex.ActiveRow.GetCellValue("Val")
This will prevent creation of the UltraGridCell object which will help to minimize memory usage. There are more details on this in the help.
Let me know if you have any questions with this matter.
Thanks for the response. Another question. How would I retrieve a value if there is no activerow?
If the first entry is the one I want, I can't use activerow and there doesn't seem to be an Index method.
You could use the Rows collection:
cmbIndex.Rows[0].GetCellValue("Val")
Let me know if you have any questions with this matter