[CLOSED] Using custom template in a ComboBox

  1. #1

    [CLOSED] Using custom template in a ComboBox


    As per a previous support issue, I'm using a template to render the content of my ComboBox. It all renders OK, but I can't select the items from the dropdown - they don't appear as selectable... is there something missing from my template?


    <ext:ComboBox ID="ResultsSetCombo" runat="server" FieldLabel="Mapping Result Set"
                                    Editable="false" DisplayField="CreationDate" ValueField="FrontEndMappingSetId" TypeAhead="false"
                                    Mode="Local" DataIndex="FrontEndMappingSetId" Width="500" SelectedIndex="0">
                                        <ext:Store ID="FrontEndMappingResultsStore" runat="server" AutoLoad="true">
                                            <ext:JsonReader IDProperty="FrontEndMappingSetId">
                                                    <ext:RecordField Name="FrontEndMappingSetId" />
                                                    <ext:RecordField Name="CreationDate" Type="Date"/>
                                    <Template runat="server">
                                            <tpl for=".">
                                                <div>{CreationDate:date("d-M-Y h:i")}</div>
                                        <AfterRender Fn="onAfterRender" />
                                        <Select Fn="onSelect" />
                                        <Blur Fn="onBlur" />
        var onAfterRender = function () {
                this.setRawValue(Ext.util.Format.date(this.getRawValue(), "d-M-Y h:i"));
            var onSelect = function (combo, record, index) {
                this.setRawValue(Ext.util.Format.date(record.get("CreationDate"), "d-M-Y h:i"));
            var onBlur = function () {
                this.setRawValue(Ext.util.Format.date(this.getRawValue(), "d-M-Y h:i"));
    Last edited by Daniil; May 02, 2011 at 10:37 AM. Reason: [CLOSED]
  2. #2

    You have to define ItemSelector property
    Please see
    Vladimir Shcheglov
    Sr. Developer

Similar Threads

  1. Custom Template Column
    By QualityCode in forum 1.x Help
    Replies: 2
    Last Post: Oct 29, 2011, 11:18 PM
  2. [CLOSED] [1.0] ComboBox Template
    By state in forum 1.x Premium Help
    Replies: 2
    Last Post: Mar 25, 2010, 5:36 PM
  3. [CLOSED] Custom Template From CodeBehind
    By Immobilmente in forum 1.x Premium Help
    Replies: 2
    Last Post: Feb 10, 2009, 9:35 AM
  4. Custom Grid Header Template
    By mathec in forum 1.x Help
    Replies: 2
    Last Post: Jan 30, 2009, 7:20 PM
  5. [CLOSED] Grouping View Custom Template
    By peterdiplaros in forum 1.x Premium Help
    Replies: 12
    Last Post: Dec 08, 2008, 1:22 PM

Posting Permissions