Ejemplo n.º 1
0
 protected internal override void ChangeItemSelectState(ListItemTester item, bool selected)
 {
     if (SelectionMode == ListSelectionMode.Single)
     {
         SetListSelection(item, selected);
     }
     else
     {
         ToggleItemSelection(item, selected);
     }
 }
Ejemplo n.º 2
0
 protected void ToggleItemSelection(ListItemTester item, bool selected)
 {
     if (selected)
     {
         EnterInputValue(item.Element, Tag.Attribute("name"), item.Value);
     }
     else
     {
         RemoveInputValue(item.Element, Tag.Attribute("name"));
     }
     OptionalPostBack(Tag.OptionalAttribute("onchange"));
 }
Ejemplo n.º 3
0
        protected void SetListSelection(ListItemTester item, bool selected)
        {
            string name = Tag.Attribute("name");

            foreach (XmlElement option in OptionList)
            {
                RemoveInputValue(option, name);
            }
            if (selected)
            {
                EnterInputValue(item.Element, name, item.Value);
            }
            OptionalPostBack(Tag.OptionalAttribute("onchange"));
        }
Ejemplo n.º 4
0
 protected internal virtual void ChangeItemSelectState(ListItemTester item, bool selected)
 {
     SetListSelection(item, selected);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Determines whether the collection contains the specified item.
 /// </summary>
 /// <param name="item">A System.Web.UI.WebControls.ListItem to search for in the collection.</param>
 /// <returns>true if the collection contains the specified item; otherwise, false.</returns>
 public bool Contains(ListItemTester item)
 {
     return(InnerList.Contains(item));
 }