DataView [0.8.1] The Template can't be empty

  1. #1

    DataView [0.8.1] The Template can't be empty

    Hi,

    I have the following code. Mainly I am trying to display something like this: https://examples1.ext.net/#/TreePane...age_Organizer/ What I am doing wrong?

    
    cimages is a list of an object composed of and URL and a Name.
    
    DataView dataview = new DataView();
    Store store = new Store();
    store.DataSource = cimages;
    store.DataBind();
    XTemplate xTemplate = new XTemplate();
    xTemplate.CustomConfig.Add(new ConfigItem("html", "['<ul class=\"\">','<tpl for=\".\">','<li><div class=\"\"><img src=\"{Url}\"></div><span>{Name}</span></li>','</tpl>','</ul>','']", ParameterMode.Raw));
    dataview.Template.Text =  xTemplate.Text;
    dataview.StoreID = store.ID;
    dataview.ItemSelector = "div";
    dataview.StyleSpec = "overflow:auto";
    dataview.MultiSelect = true;
    _leftPanel.Items.Add(dataview);
    I am getting this error: The Template can't be empty
  2. #2
    Geoffrey McGill
    Founder

Similar Threads

  1. DataView Template Issues (bug?)
    By cleve in forum 2.x Help
    Replies: 4
    Last Post: Jun 07, 2012, 8:36 AM
  2. GridPanel, DataView, ListView template
    By alexrodi82 in forum 1.x Help
    Replies: 1
    Last Post: Jan 25, 2012, 8:20 AM
  3. [CLOSED] DataView [0.8.1] The Template can't be empty
    By cobiscorp in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Jul 23, 2010, 5:04 PM
  4. Buttons in a DataView template?
    By shaun in forum 1.x Help
    Replies: 2
    Last Post: Aug 24, 2009, 3:11 AM
  5. Replies: 0
    Last Post: Jun 26, 2009, 11:32 AM

Tags for this Thread

Posting Permissions