PDA

View Full Version : How to create the dyanmic locking grid like pivot grid



@sagardindorkar@
16 Oct 2014, 2:46 AM
Hello Sencha team,

Create the dyanmic locking grid like pivot grid :

Add the header dynamically but not able to add header dynamically..Please provide some solution thanks

var grid = Ext.create('Ext.grid.Panel', {
store: store.load(),
columnLines: true,
columns: [{
text: 'Provider',
locked: true,
width: 100,
sortable: false,
dataIndex: 'FundingProvider'
},
{
text: 'Ser Type',
locked: true,
width: 100,
sortable: false,
dataIndex: 'ServiceType'
}

{

header: 'Fee Charts1',// this feild dynamically add by the data
columns: [
// { header: 'Name',id: 'Name', header: 'Fee Chart', width: 60, sortable: true, dataIndex: 'Name' },
{ id: 'NRate', header: 'Normal Rate', align: 'right', sortable: true, dataIndex: 'NormalRate', renderer: renderCurrency },
{ id: 'WRate', header: 'Weekend Rate', align: 'right', sortable: true, dataIndex: 'WeekendRate', renderer: renderCurrency },
{ id: 'HRate', header: 'Holiday Rate', align: 'right', sortable: true, dataIndex: 'HolidayRate', renderer: renderCurrency },
{ id: 'RF', header: 'Rate Factor', align: 'right', sortable: true, dataIndex: 'RateFactor' }
]
},
{

header: 'Fee Charts2',
columns: [
// { header: 'Name',id: 'Name', header: 'Fee Chart', width: 60, sortable: true, dataIndex: 'Name' },
{ id: 'Rate1', header: 'Normal Rate', align: 'right', sortable: true, dataIndex: 'NormalRate', renderer: renderCurrency },
{ id: 'WRate1', header: 'Weekend Rate', align: 'right', sortable: true, dataIndex: 'WeekendRate', renderer: renderCurrency },
{ id: 'HRate1', header: 'Holiday Rate', align: 'right', sortable: true, dataIndex: 'HolidayRate', renderer: renderCurrency },
{ id: 'RF1', header: 'Rate Factor', align: 'right', sortable: true, dataIndex: 'RateFactor' }
]
}



],
height: 350,
width: 600,
// title: 'FC',

viewConfig: {
stripeRows: true
},

});

slemmon
17 Oct 2014, 11:03 PM
Hi,

I'm afraid I'm not quite sure what you're looking to accomplish. Can you elaborate?