CHAN Reference

Chan Home | Reference Home | Event Firing Order | web.config

   

Controls.List

     
  • Name List
  • CSS Class [ul/ol].CC_List, li.li[n], li.lin
  • Type N/A

The List control allows you to create a bulletted or numbered list of items including items having sub-lists. It has a number of Add() method overloads to allow very simple lists - or lists of links that you can style into menus via CSS. It also has a built in public class called ItemList which you can spawn independently and populate. The Example and Live tabs show it in action in a way that this description can not do it justice.

You can also prefix LI items from the ASPX by placing them inline within the Chan:List tag. The Example and Live tabs' "Zero" item is added this way. These items are always first in the list and must be defined using plain <li></li> tags, inline styles or script will break the parser (it just splits on <li>!). Any HTML within the tags however will be respected and left intact.

CSS Styling

To aid styling the control's ID is set into the opening OL/UL tag and each LI within it is classed as li0,li1,li2 ... li[n]. The final/bottom item in the list is also classed as "lin" for browsers where :last-child is not supported.

Roadmap

  • Yield a little more CSS style-ability, (e.g. LI ID's) to help produce drop down menus etc
  • ListItem class should really be elsewhere in the namespace not an internal class