[CLOSED] I think I put that in the preface Dynamic RowExpander

  1. #1

    [CLOSED] I think I put that in the preface Dynamic RowExpander

    Is it possible to change what template you want to apply in a row expander based on a value from the record?

    For example:
      <ext:RowExpander ID="RowExpander" runat="server" ExpandOnEnter="true" SingleExpand="true">
        
    if (record.data.ChangeType=='Added')
                     <Template runat="server" ID="t1">
                             <Html>
    <h1>Added</h1>
    {Field1}
                            </html>
    </Template?
    else
                     <Template runat="server" ID="t1">
                             <Html>
    <h1>Changed</h1>
    {Field1}
                            </html>
    </Template?
    </ext:RowExpander>
    Last edited by Daniil; Sep 27, 2012 at 6:34 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use a conditional statement.
    <tpl if="some condition">
    Here you can find more details.
    http://docs.sencha.com/ext-js/4-1/#!/api/Ext.XTemplate
  3. #3
    Quote Originally Posted by rthiney View Post
    Is it possible to change what template you want to apply in a row expander based on a value from the record?

    For example:
      <ext:RowExpander ID="RowExpander" runat="server" ExpandOnEnter="true" SingleExpand="true">
        
    if (record.data.ChangeType=='Added')
                     <Template runat="server" ID="t1">
                             <Html>
    <h1>Added</h1>
    {Field1}
                            </html>
    </Template?
    else
                     <Template runat="server" ID="t1">
                             <Html>
    <h1>Changed</h1>
    {Field1}
                            </html>
    </Template?
    </ext:RowExpander>
    Will this work if I'm using a rowexpander in a grid?
  4. #4
    Quote Originally Posted by rthiney View Post
    Will this work if I'm using a rowexpander in a grid?
    I am not sure what you mean: your code sample or my suggestion?

    If the first, then no, it won't work. If the second, yes, it will work.

Similar Threads

  1. RowExpander - Dynamic Gridpanels
    By Rupesh in forum 1.x Help
    Replies: 0
    Last Post: Apr 11, 2012, 10:41 AM
  2. Replies: 12
    Last Post: Sep 20, 2011, 2:33 PM
  3. Replies: 2
    Last Post: Aug 17, 2011, 9:58 PM
  4. [CLOSED] Dynamic RowExpander With Gridpanel using Command Buttons
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 08, 2011, 2:49 PM
  5. [CLOSED] Create a dynamic event for dynamic components.
    By stoque in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: May 10, 2011, 9:16 PM

Posting Permissions