Results 1 to 2 of 2

Thread: How to add a grid to Ext.ux.RowExpander

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2013
    Location
    Bangalore, India
    Posts
    68
    Answers
    1

    Default How to add a grid to Ext.ux.RowExpander

    Hi,

    I have a grid panel.
    I am using RowExpander plugin.
    I am doing like this

    var grid1 = Ext.create('Ext.grid.Panel', { store: getLocalStore(), columns: [ {text: "Company", flex: 1, dataIndex: 'company'}, {text: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'}, {text: "Change", dataIndex: 'change'}, {text: "% Change", dataIndex: 'pctChange'}, {text: "Last Updated", renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} ], enableLocking: true, width: 600, height: 300, plugins: [{ ptype: 'rowexpander', rowBodyTpl : new Ext.XTemplate( '<p><b>Company:</b> {company}</p>', '<p><b>Change:</b> {change:this.formatChange}</p><br>', '<p><b>Summary:</b> {desc}</p>', { formatChange: function(v){ var color = v >= 0 ? 'green' : 'red'; return '<span style="color: ' + color + ';">' + Ext.util.Format.usMoney(v) + '</span>'; } }) }], collapsible: true, animCollapse: false, title: 'Expander Rows in a Collapsible Grid with lockable columns', iconCls: 'icon-grid', margin: '0 0 20 0', renderTo: Ext.getBody() });
    How i can add a grid to rowBodyTpl?
    Please someone help?

    thanks in advance.

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    While grids don't offer a way to render components into the cells/rows right from the framework you might take a look at this user extension:
    http://skirtlesden.com/ux/component-column

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •