Hello,
I created a custom control which consists of a label and a listbox. The control has to have a public property called 'Items' which allows users to add list items to the control's listbox during design time. (much like the Items property of the vb listbox). I used ListItemsCollectionEditor to display the ListItems Editor window.
I added some list items using the ListItems Editor window but the listbox did not display the newly added items at all.
A code snippet is given below:
Private listitems as new ListItemCollection
<EditorAttribute(GetType(System.Web.UI.Design.WebControls.ListItemsCollectionEditor), _
GetType(UITypeEditor))> _ 'displays the ListItemEditor window
Public ReadOnly Property Items() As ListItemCollection
Get
Return listitems
End Get
End Property
How do I let the listbox to display the newly added list items from the ItemCollection Editor window?
Advice would be appreciated
I created a custom control which consists of a label and a listbox. The control has to have a public property called 'Items' which allows users to add list items to the control's listbox during design time. (much like the Items property of the vb listbox). I used ListItemsCollectionEditor to display the ListItems Editor window.
I added some list items using the ListItems Editor window but the listbox did not display the newly added items at all.
A code snippet is given below:
Private listitems as new ListItemCollection
<EditorAttribute(GetType(System.Web.UI.Design.WebControls.ListItemsCollectionEditor), _
GetType(UITypeEditor))> _ 'displays the ListItemEditor window
Public ReadOnly Property Items() As ListItemCollection
Get
Return listitems
End Get
End Property
How do I let the listbox to display the newly added list items from the ItemCollection Editor window?
Advice would be appreciated