APNSoft - Web Controls, components for ASP.NET Home Help Center Contact Us
About UsProductsDownloadsPurchase
Support

ComboBox
Version 1.5



What's New
Overview
Features
Reference Book
Licensing
Support



Design
Layout and Behavior
Programming




APNSoft ComboBox uses XML for defining ComboBox Structure since XML is the most convenient and widespread format for structured data. The XML ComboBox Structure consists of a number of nested elements (items).

<select>
	<item id="1" title="AltaVista" />
	<item id="2" title="Google" />
	<item id="3" title="Yahoo" />
	<separator />
	<item id="4" title="AlltheWeb" />
	<item id="5" title="dmoz" />
	<item id="6" title="Excite" />
	<item id="7" title="GO" />
	<item id="8" title="HotBot" />
	<item id="9" title="MSN" />
	<item id="10" title="Overture" />
</select>

The code above creates the following ComboBox:

 

You can save the XML definition structure as a file (ComboBox Structure File) and bind the ComboBox by specifying the StructureFileURL component property.

You can also bind the ComboBox at runtime, by dynamically creating the XML structure and using the StructureXMLDocument property of ComboBox component.


ComboBox Structure File elements
  • select - root element for entire ComboBox Structure File. Does not include attributes.
  • item - one ComboBox element in DropDown List.

    Can include attributes:

    • id - unique identifier for one List Item. Element is required.
    • selected - means that current Item is selected by default
    • icon - specifies the name of the one Item's icon image. The icon image displayed at the left side of the one DropDown List Item. All icon images must be located in the folder with images of your web site, as specified in the ImagesFolderURL property.
    • iconWidth, iconHeight - one Item's icon image width and height. This attributes can be specified only once if the ComboBox uses an icons with identical width and height.
    • leftSpan - blank space in pixels at the left side of the current Item
    • href, target - the URL and target the browser is directed to when a user clicks the Item. Full analogue with the attributes of the HTML element.
  • separator - element for horizontal separator. Does not include attributes.

ComboBox element examples

<item id="1" title="AltaVista" icon="AltaVista.gif" iconWidth="16" iconHeight="16" />
<item id="2" title="Google" href="http://www.google.com" target="_blank" />
<item id="3" title="Yahoo" leftSpan="16" selected="selected" />

Attention! Element names and attributes are case-sensitive. Be careful when you're typing in your data.





  © 2003-2008 APNSoft. All rights reserved. Table of Contents   Terms of use   Contact Us   Help Center