Information to ComboBox Item Template
The asp.net ComboBox Control allows users to define an Item Template for enhancing the visualization effect of the combobox items. In default, if we do not specify an Item Template, all the items contained in the combobox will be displayed on the drop-down list in the form of plain text. Thus, if we want to render the web combobox item in a vivid and visual format, we need to use the Item Template property. The remarkable thing is that the ComboBox Control enables users to embed various types of content, like html markup, web server control or other UI control for ASP.NET AJAX, to a template.
And in this online tutorial page, we will guide users to specify an Item Template in ASP.NET web application using ComboBox Control for ASP.NET AJAX. How to Customize Item Template in ASPX
As is mentioned above, the asp.net ComboBox Control allows us to define file url, image, backgroud and add other controls in the item template. And in this section, we will illustrate the item template specifying application with a detailed programming example. In this programming example, image, checkbox and text are all added to the item template. <kettic:PerComboBox runat="server" ID="PerComboBox1"
From the example, you will find that we use the <%# Eval("") %> statement to specify the image and text that will be displayed in the template. And in order to enable the template to have the access to the Text property, users have to clearly bind the items using DataBind method before they use the asp.net ComboBox itemsâs properties to bind elements in the template. Otherwise, the items will appear as the same in the drop-down list.
Here we attach an image which displays the result of above programming example.
If you meet any problems in the combobox item template specifying process, please feel free to contact us. And please make sure that you have installed .NET Framework 3.5 or later versions and have added all necessary dlls from UI SDK for ASP.NET AJAX into your project before you run the item template customizing application. Other ComboBox Template Related Tutorial
Apart from the item template, the web ComboBox Control also has the ability to allow users to define the footer and header templates in aspx file programmatically. To view more detailed guidance, please visit this Header and Footer Templates of ComboBox Control. |
ASP.NET AJAX UI Controls ASP.NET AJAX Chart UI Control ASP.NET AJAX Grid UI Control ASP.NET AJAX Barcode UI Control ASP.NET AJAX Button UI Control ASP.NET AJAX Calendar UI Control ASP.NET AJAX NavigationBar UI Control ASP.NET AJAX Captcha UI Control ASP.NET AJAX Color Editor UI Control ASP.NET AJAX ComboBox UI Control OverviewGetting StartedElementsFeatures FilteringValidationAutoCompleteChekBox SupportRender ModesLoad On DemandTemplates Item Template Header and Footer TemplateData Binding ArrayList DataDataSource DataXML DataClient Prpgramming ComboBox EventServer Programming ComboBox EventASP.NET AJAX DataPager UI Control ASP.NET AJAX Dock UI Control ASP.NET AJAX DropDownList UI Control ASP.NET AJAX DropDownTree UI Control ASP.NET AJAX HtmlEditor UI Control ASP.NET AJAX FileManager UI Control ASP.NET AJAX Filter UI Control ASP.NET AJAX Input UI Control ASP.NET AJAX ListBox UI Control ASP.NET AJAX ListView UI Control ASP.NET AJAX ToolBar UI Control ASP.NET AJAX TabControl UI Control ASP.NET AJAX Menu UI Control ASP.NET AJAX ToolTip UI Control |