Home Forums WinForms controls Xceed Grid for WinForms How can I get the display member of the combo? Reply To: How can I get the display member of the combo?

User (Old forums)
Member
Post count: 23064

I think you’ll have to manually look up the display that comes with the value. First you get the value (row.Cells(“desc”).Value()), then you loop through the datasource of the combobox.

I’m a C# programmer, and I see you need a VB.NET solution. So, I’ll give you some pseudocode (please convert to prefered language):
<code>
object value = row.Cells(“desc”).Value()
object display = null
foreach DataRow row in sqlDS.Tables(“result”).Rows do
if object.Equals(value, row.Item(“code”)) then
display = row.Item(“description”)
break
end if
end for
</code>

Imported from legacy forums. Posted by Tommy (had 2985 views)