开发者

how to access multiple elements selected in listbox in vb.net

i have set selection mode to multiExtended in vb.net So i am able to select multiple elements but how to access those selected values/indice开发者_JS百科s using SelectedItems property?


SelectedItems gives you a SelectedObjectCollection which you could go through using simple indices such as:

mySelectList.SelectedItems[0] would give you the first selected item.


You use the SelectedItems property. Since it is an IEnumerable you can use for-each constructs to iterate the list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜