Hi
I have a page with a radmultiselect. The items are populated using a webservice with the response in json format. All works fine.
I'm trying to get the items in code behind, but the RadMultiSelect.Items are aways null.
RadMultiSelect rms = area.FindControl(
"id_of_radmultiselect"
)
as
RadMultiSelect;
if
(rms !=
null
) {
var selectedValues = rms.Value;
foreach
(
string
value
in
selectedValues) {
MultiSelectItem selectedItem = rms.Items.FindChildByValue(value);
string
result =
string
.Format(
"Selected item with text: <strong>{0}</strong> and value: <strong>{1}</strong><br />"
, selectedItem.Text, selectedItem.Value);
}
}
In my test I added two items and I get in the rms.Value the number 2.
But the rms.Items is always count = 0, and when I try to find chield by value the result are null.
Why the Value have two items and in the rms.Items is 0?
Thank you