[CLOSED] Icon in a Combox

  1. #1

    [CLOSED] Icon in a Combox

    Hi there !
    I got my first Google Style Combo Box ready ! Cool feature and easy to implement :-)

    Now one little question. One of the Store Data is a Boolean Type. I'd like to show a Icon in case of a true Value !
    How can I modify the Template based on Store data ?

    Kind Regards
    Peter


    <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="Incoterms.ascx.vb" Inherits="CUST.Import.View.View.Import.Incoterms" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <link href="../css/Main.css" rel="stylesheet" type="text/css" />
    <ext:Panel ID="pnlOuter" runat="server" Height="30" Border="False" Width="150">
        <Items>
            <ext:ComboBox ID="cboIncoterms" runat="server" DisplayField="Term" ValueField="_Id" TypeAhead="false" LoadingText="Searching..."  HideTrigger="true" ItemSelector="div.search-item"    MinChars="1" Grow="True">
                <Store>
                    <ext:Store ID="Store1" runat="server" AutoLoad="false">
                        <Proxy>
                            <ext:HttpProxy Method="POST" Url="Incoterms.ashx" />
                        </Proxy>
                        <Reader>
                            <ext:JsonReader Root="terms" TotalProperty="total" IDProperty="_Id">
                                <Fields>
                                    <ext:RecordField Name="_Id"  /> 
                                    <ext:RecordField Name="Year" />
                                    <ext:RecordField Name="Term" />
                                    <ext:RecordField Name="Description" />
                                    <ext:RecordField Name="SeaOnly" Type="Boolean" />
                                </Fields>
                            </ext:JsonReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <Template ID="Template1" runat="server">
                    <Html>
                        <tpl for=".">
                              <div class="search-item">
                                  <h3><span>{Term}</span></h3><br/>    {Description}     
                                    <br/> <p align="right"> {Year}</p>
                                 
                              </div>
                           </tpl>
                    </Html>
                </Template>
            </ext:ComboBox>
        </Items>
    </ext:Panel>
    Last edited by Daniil; Aug 18, 2012 at 9:38 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use:
    <tpl if="SeaOnly">
        //HTML when SeaOnly is true
    </tpl>

Similar Threads

  1. [CLOSED] Firefox combox bug
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 31, 2011, 1:31 PM
  2. Combox align
    By Yannis in forum 1.x Help
    Replies: 0
    Last Post: Nov 05, 2009, 1:26 PM
  3. [CLOSED] Need help with combox -
    By JD in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 26, 2009, 3:31 PM
  4. [CLOSED] combox value not set
    By Satyanarayana murthy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 21, 2009, 12:29 PM
  5. combox
    By sunmooncm in forum 1.x Help
    Replies: 0
    Last Post: Apr 14, 2009, 2:36 PM

Posting Permissions