Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- Overview
- Installation & Deployement
- EO.Web ToolTip
- EO.Web Rating
- EO.Web Slider & RangeSlider
- EO.Web ListBox
- EO.Web ComboBox
- EO.Web Captcha
- EO.Web ASPX To PDF
- EO.Web Slide
- EO.Web Flyout
- EO.Web EditableLabel
- EO.Web ImageZoom
- EO.Web Floater
- EO.Web Downloader
- EO.Web ColorPicker
- EO.Web HTML Editor
- EO.Web File Explorer
- EO.Web SpellChecker
- EO.Web Grid
- EO.Web MaskedEdit
- EO.Web Splitter
- EO.Web Menu
- EO.Web Slide Menu
- EO.Web TabStrip
- EO.Web TreeView
- EO.Web TreeView
- Overview
- Using EO.Web TreeView
- TreeNode and TreeNodeGroup
- Look, Skin and Theme
- Style and Appearance
- Data Binding
- Handling Event
- EO.Web Calendar
- EO.Web Callback
- EO.Web MultiPage
- EO.Web Dialog
- EO.Web AJAXUploader
- EO.Web ProgressBar - Free!
- EO.Web ToolBar - Free!
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
Using Item Template |
Apply to
Overview
EO.Web navigation controls support using look ID or template item to specify the common settings for items created during data binding.Using Default Item Look ID
Use a group's DefaultItemLookID to specify the default item look ID for the navigation items in the group. This property is used when a navigation item's LookID is set to default value Auto.
For more information about looks, see Look topic.
Using Template Item
A group's TemplateItem is used to define common settings for the group's child items, which are dynamically created during the data binding, for example:
<eo:Menu Runat="server" id="menu1"> <TopGroup> <TemplateItem OnClickScript="window.alert('hi');"> </TemplateItem> <TopGroup> </eo:Menu>
The code above populates the menu with two items with both items' OnClickScript set to "window.alert('hi'); ".
Template item can contain sub group which has its own template item. For example:
<eo:Menu Runat="server" id="menu1"> <TopGroup> <TemplateItem OnClickScript="window.alert('first level');"> <SubMenu ShadowDepth=3> <TemplateItem OnClickScript="window.alert('second level');"> </TemplateItem> </SubMenu> </TemplateItem> <TopGroup> </eo:Menu>
Binding this menu to a hierarchical data source sets all first item's OnClickScript to "window.alert('first level'); " and all second level navigation item's OnClickScript to "window.alert('second level'); ".
Unlike look items, which only work with appearance related properties, template item works with almost all properties. You can specify the properties in the TemplateItem and they will be applied to the items created during data binding.
Using CustomItem with template item
You can also use CustomItem with template item. CustomItem enables a navigation item to nest any ASP.NET server control as its content. See Custom Item for more details.