1. #1
    Ext User
    Join Date
    Oct 2010
    Posts
    4
    Vote Rating
    0
    aabdelraouf is on a distinguished road

      0  

    Default RowExpander with Dynamic Template

    RowExpander with Dynamic Template


    Hi All,

    I want to create a grid with a RowExpander. The problem I am facing is that each row has different information to be displayed in the expanded area. For example, each row represents a subject and the expanded area displays the grades related to this subject (exam1, exam2, etc.) as follows:
    +math
    exam1 Excellent
    exam2 Very Good
    ...

    The problem is that i can't predict the number of grades (exams) each subject has, so a fixed template will not work in this case.

    What is the best way to deal with such a case?

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    XTemplate can handle this directly. I probably have these things in a List in your model?

  3. #3
    Ext User
    Join Date
    Oct 2010
    Posts
    4
    Vote Rating
    0
    aabdelraouf is on a distinguished road

      0  

    Default


    Yes, I have it as a list in the model but I don't know how the XTemplate will iterate over it.
    It would be nice if you could give an example XTemplate that does this job.

    Thank you

  4. #4
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    There is an example (the second one): http://www.sencha.com/examples/explorer.html#templates

Similar Threads

  1. Doubt about RowExpander + Ext.Template
    By eduardolagares in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 11 Jul 2010, 1:21 PM
  2. Pass a value to RowExpander template
    By sanjshah in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 9 Nov 2009, 1:43 AM
  3. Template problems in Rowexpander
    By chrizmaster in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 20 Apr 2009, 4:06 AM
  4. template (rowexpander) not refreshing data
    By FlexIDX in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 6 Nov 2007, 2:42 PM

Thread Participants: 1

Tags for this Thread