when DataGridView has a combobox column, how can I get the text it displays as oppose to the value it represents? When I do DGV.Item("cbo",i).Value
I get the value but it won't take DGV.Item("cbo",i).Text
. I trying Ctype(DGV.Item("cbo",i),ComboBox).Text
and this does not work either.
views:
172answers:
2
A:
Umm are you talking about Win Forms?
If so, Value
is the property you want, and is what is to be displayed on the screen and held behind the scenes.
If you want something different not shown to the user, I've often used the property Tag
for that.
GONeale
2009-11-16 02:51:16
Yes, winform. Value gives the value/ID not what is displayed
bochur1
2009-11-16 04:42:40