I'm using a ListBox for selecting an item.
If a button of the control is clicked, I want to fetch the SelectedValue.
The SelectedItem is not null (since one item is selected) but all properties of the SelectedItem (which shoud be set, like Value, Text, ImageUrl) are empty. In fact, all Items of the ListBox don't have their information anymore.
I add the items only once (when the ListBox is initially created) - I simple create a List of RadListBoxItem and add them to the ListBox.
This is the code I use to create the ListBox:
m_listBox.SelectionMode = ListBoxSelectionMode.Single;
List<RadListBoxItem> items = LoadItems();
m_listBox.SelectedIndex = 0;
The Initialized property is saved in viewstate because my control isn't added when the page loads initially but later in a workflow.
This is how I create an item:
RadListBoxItem item =
All values are added correctly but in the PostBack they are empty.
What could cause this behavior?