I load a webdropdown in the manner of code below...
cmbDropDown.Items.Insert(i, New DropDownItem("", "")) 'Add empty item Do While dr.Read i += 1 cmbDropDown.Items.Insert(i, New DropDownItem(dr.GetValue(dr.GetOrdinal("statedescription")).ToString, dr.GetValue(dr.GetOrdinal("stateabbrev")).ToString)) Loop
I would like to set one of the values to be the default value. I can't seem to figure out how to do this. I am using version 15.1. Thank you in advance.
Hello,
If I understand correctly, by "default" you would like to make one of the values selected by default. As there is a Selected option, I expect it should be possible to make a particular item selected (populate the input), using something like the following - will do this for the forth Item:cmbDropDown.Items[3].Selected = true;
Please let me know if it is other you had in mind.