vb.net - Visual Basic - DropDown text not altered to reflect value -
i working in vb
, have event supposed update number of values in dropdown
, , update text accordingly:
integer = 0 (prices.items.count - 1) if prices.items(i).text.contains("£") dim dconvertedvalue = gettextasdouble(prices.items(i).value) / dconversionrate prices.items(i).value = dconvertedvalue.tostring() 'should update displayable text here, no change prices.items(i).text = (math.floor(dconvertedvalue).tostring("n") & "$") end if next
this works fine in theory, , have stepped-through , can see values changing expected. however, dropdown not update @ point.
i'm new vb, simple syntax error. know why might be?
mark
try using have used exact code changed loop 'for each'
for each item listitem in prices.items if item.text.contains("£") dim dconvertedvalue = (gettextasdouble(item.value) / dconversionrate) items.value = dconvertedvalue.tostring() items.text = (math.floor(dconvertedvalue).tostring("n") & " sq m") end if next
Comments
Post a Comment