A checkboxdropdownlist is used to filter data for a chart. After the initial load of list items the first item in the list is selected - even though it is not checked. Turning it off in code doesn't work either.
for
(i = 0; i < theRoot.ChildNodes.Count; i++)
{
ServerName = theRoot.ChildNodes[i].Attributes[
"Name"
].Value;
foreach
(XmlNode aNode
in
theRoot.ChildNodes[i])
{
if
(aNode.InnerText == Environment)
{
sb =
new
StringBuilder();
sb.Append(ServerName.Replace(
"XX"
, aNode.InnerText));
lItem =
new
Item(j, sb.ToString());
lvServers.Add(lItem);
j++;
}
}
}
rcddlServers.DataSource = lvServers;
rcddlServers.ValueMember =
"id"
;
rcddlServers.DisplayMember =
"description"
;
rcddlServers.DropDownListElement.SelectionMode = SelectionMode.MultiSimple;
if
(rcddlServers.SelectedItems.Count > 0) --> why is this possible?
{
rcddlServers.Items[0].Checked =
false
;
}