Combobox template always shows fields, even when theres no data

  1. #1

    Combobox template always shows fields, even when theres no data

    I currently have a combobox that I create an html template for, then through the HttpProxy and JsonReader supply it data from a web service. I am looking for a way to hide a template field if there is no data returned. If I remove the field from the json data coming back from the webservice, the template still displays that field's label. Can someone point to me a resource when there is more information on using the .Template.Html property of the ext.net.combobox in a dynamic fashion? Any help is appreciated, thanks!

    Here is a sample of my template in HTML

    <tpl for=".">
    <div class="search-item">
    <span style='margin-left:3px;'>Email: {mail}</span><br/>
    <span style='margin-left:3px;'>Phone: {telephoneNumber}</span><br/>
    <span style='margin-left:3px;'>Description: {description}</span><br/>
    <span style='margin-left:3px;'>Department: {department}</span><br/>
    <span style='margin-left:3px;'>Company: {company}</span><br/>
    <br/>
    </div>
    </tpl>

    I also tried adding code blocks to my html that would be evaluated at render time. (<%= %>) but it looks like something behind the scenes turns these into comment blocks. Any info on why this happens would be appreciated as well. Thanks.
    Last edited by strader81; May 15, 2012 at 9:28 PM. Reason: Provide more info

Similar Threads

  1. [CLOSED] DataView template JS error when bound with data
    By cleve in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 07, 2012, 1:51 PM
  2. Replies: 3
    Last Post: Mar 21, 2012, 8:24 AM
  3. grdpanel does not shows the binding data
    By Dinesh.T in forum 1.x Help
    Replies: 1
    Last Post: Mar 26, 2010, 5:31 AM
  4. Replies: 4
    Last Post: Dec 18, 2009, 6:18 PM
  5. ComboBox shows html on itemselected
    By jmilton in forum 1.x Help
    Replies: 1
    Last Post: Apr 17, 2009, 6:40 PM

Tags for this Thread

Posting Permissions