What's Happening

  • You need the RS Event plugin for this section.
  • Or use the Sidebar Widget plugin to change the content.

Expander tpl

Jan 7th, 2009 by smith |
  • Hi,

    I'm using the expander for my grid, for a normal grid you can add the unescape function as a renderer for a field:

    renderer: function(value, metadata, record){return unescape(value);}

    But is it possible to use this also for the expander template?


    var reader = new Ext.data.ArrayReader({}, [
    {name: 'emailtype'},
    {name: 'datesent'},
    {name: 'emailrecipient'},
    {name: 'otherinfo'},
    {name: 'emailcomments'},
    ]);

    var expander = new xg.RowExpander({
    tpl : new Ext.Template(
    '

    Sent To: {emailcomments}
    '
    )
    });


    Or is it possible to 'feed' a value to div when a row is selected in the grid i.e.

    if I have a west region and my grid is displayed in the centre region, if the user clicks a row, the emailcomments is displayed in the west region?

    Thanks.

    Sanj



  • Apologies, here is the full code:

    I have added a typical escaped email that does not seem to work in the detail area.





    Data Binding Example - Implemented with classes









    Data Binding Example - Implemented with classes




  • are you using the template at all?


  • yes, I'm using it

    are you using the template at all?


  • where's the code where you use it?


  • Thanks for your response, I tried the databinding but is there a way to unescape a vlaue, so in this example unescape the 'Manufacturer'?



    // create the data store
    var store = new Ext.data.SimpleStore({
    fields: [
    {name: 'Title'},
    {name: 'Manufacturer'},
    {name: 'ProductGroup'},
    {name: 'DetailPageURL'},
    {name: 'Author', mapping: 'Manufacturer'},
    {name: 'desc'}
    ]
    });
    store.loadData(myData);



    // define a template to use for the detail view
    var bookTplMarkup = [
    'Product Group: {Manufacturer}
    '
    ];
    var bookTpl = new Ext.Template(bookTplMarkup);


  • look a the 'data binding' example for your answer ;)







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Expander tpl , Please add it free.