[CLOSED] Custom Template From CodeBehind

  1. #1

    [CLOSED] Custom Template From CodeBehind



    Hi everibody,
    i have a simple question?

    How is possible change my ComboBox template by CodeBehind?

    I tried:
    XTemplate myTemplate = new XTemplate();
    myTemplate.Text = "<tpl for=\".\"><div class=\"list-item\"><h3>{Name}</h3>{Description}
    </tpl>";
    MyCombo.Template = myTemplate;
    But this is not possible because MyCombo.Template is in ReadOnly.
    How is the best way to do it?

    Thanks,
  2. #2

    RE: [CLOSED] Custom Template From CodeBehind

    Hi Andrea,


    Try


    MyCombo.Template.Text = "<tpl for=\".\"><div class=\"list-item\"><h3>{Name}</h3>{Description}
    </tpl>";</PRE>
    </PRE>
    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: [CLOSED] Custom Template From CodeBehind



    Hi Vladsh,
    i resolved doing this

    MyCombo.Template.Text = "<tpl for=\".\"><div class=\"list-item\"><h3>{Nome}</h3>{Descrizione}
    </tpl>";
    Thanks again for your fast reply,

Similar Threads

  1. [CLOSED] Custom event in custom tree panel not being generated
    By anup in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 31, 2011, 8:45 PM
  2. Custom Template Column
    By QualityCode in forum 1.x Help
    Replies: 2
    Last Post: Oct 29, 2011, 11:18 PM
  3. [CLOSED] Using custom template in a ComboBox
    By mattwoberts in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 28, 2011, 3:06 PM
  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 Legacy Premium Help
    Replies: 12
    Last Post: Dec 08, 2008, 1:22 PM

Posting Permissions