vb.net - Read combo selectvalue with Forms.Control -


in vb.net read textbox line of code:

me.groupbox1.controls("textbox" & i).text 

but if want read combobox with:

me.groupbox1.controls("combobox" & i).selectedvalue 

i have error because selectedvalue not member of system.windows.forms.control

what can read combobox dynamically?

you need cast control combobox, can read properties normal:

directcast(me.groupbox1.controls("combobox" & i), combobox).selectedvalue 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -