I want to build a grid table as shown in the image in Extjs6.0, i have built basic grid with static column names and grid data coming from store but want to fetch column names from store and also have expandable rows. Any suggestions on how to approach it would be grateful.
Store:
Ext.define('Xmlgrid.store.Books', {
extend: 'Ext.data.Store',
alias: 'store.books',
requires: [
'Ext.data.reader.Xml'
],
fiels:['-skillID','name','shortName','description','inspectionSkillInd','passdownInd'
],
data:{
skill: [
{
"-skillId": "skill1",
"name": "B2",
"shortName": "00",
"description": "B2",
"inspectionSkillInd": "false",
"passdownInd": "true"
},
{
"-skillId": "skill2",
"name": "B1",
"shortName": "01",
"description": "B1",
"inspectionSkillInd": "false",
"passdownInd": "true"
},
{
"-skillId": "skill3",
"name": "AIMS",
"shortName": "02",
"description": "AIMS",
"inspectionSkillInd": "false",
"passdownInd": "true"
},
{
"-skillId": "skill4",
"name": "CAT A",
"shortName": "03",
"description": "CAT A",
"inspectionSkillInd": "false",
"passdownInd": "true"
},
{
"-skillId": "skill8",
"name": "RADIO",
"shortName": "07",
"description": "RADIO",
"inspectionSkillInd": "false",
"passdownInd": "true"
},
{
"-skillId": "skill9",
"name": "8",
"shortName": "08",
"description": "TOOL AND DIE",
"inspectionSkillInd": "false",
"passdownInd": "true"
},
{
"-skillId": "skill10",
"name": "9",
"shortName": "09",
"description": "COMPOSITE REPAIR",
"inspectionSkillInd": "false",
"passdownInd": "true"
},
{
"-skillId": "skill11",
"name": "10",
"shortName": "10",
"description": "SHOP SUPPORT",
"inspectionSkillInd": "false",
"passdownInd": "true"
},
{
"-skillId": "8a8a8a612b49030f012b4b1e08060010",
"name": "MECH",
"shortName": "20",
"description": "Mechanic",
"inspectionSkillInd": "false",
"passdownInd": "true"
}
],
},
proxy: {
type: 'memory',
reader: {
type: 'json',
rootProperty: 'skill'
}
}
});