Code:
var fields = [
{name: 'acctClient'},
{name: 'account'},
{name: 'shortName'},
{name: 'forms'},
{name: 'doc'},
{name: 'desc'},
{name: 'revision'},
{name: 'scan'},
{name: 'statusDate'},
{name: 'frame'},
{name: 'loc'},
{name: 'status'},
{name: 'id', type: 'int'},
{name: 'parentid', type: 'int'},
{name: 'leaf', type: 'bool'}
];
var data = [
{
"rows": [
{
"id":1,"parentid":null,"leaf":false,"acctClient":"","account":"","shortName":"","forms":"CL-SVC-SEL","doc":"","desc":"ACCOUNT SERVICES SELECTION","revision":"11-2005","scan":"03/15/2006","statusDate":"","frame":"SEZ","loc":"CMD","status":"Accepted"
},
{
"id":2,"parentid":1,"leaf":true,"acctClient":"","account":"","shortName":"","forms":"","doc":"DF","desc":"FDIC ADDENDUM FOR TRUST ACCTS","revision":"","scan":"","statusDate":"","frame":"","loc":"","status":""
}
],
"success":true,
"total":2
}
];
var acctMaintStore = new Ext.ux.maximgb.tg.AdjacencyListStore({
autoLoad : true,
leaf_field_name: "leaf",
parent_id_field_name: "parentid",
reader: new Ext.data.JsonReader({
idProperty: 'id',
root: 'rows',
fields: fields
}),
proxy: new Ext.data.MemoryProxy(data)
});
var resultPanel = new Ext.ux.maximgb.tg.GridPanel({
store: acctMaintStore,
enableHdMenu : false,
master_column_id : "forms",
disableSelection : true,
columns: [
{header: "Account/Client", hidden: true, width: 100, sortable: true, dataIndex: 'acctClient'},
{header: "Account", hidden: true, width: 100, sortable: true, dataIndex: 'account'},
{header: "Short Name (Friendly)", hidden: true, width: 150, sortable: true, dataIndex: 'shortName'},
{header: "Forms", width: 100, sortable: true, dataIndex: 'forms'},
{header: "Doc Cd", width: 125, sortable: true, dataIndex: 'doc'},
{header: "Description", width: 125, sortable: true, dataIndex: 'desc',id:'auto-expand-column-acct-maint'},
{header: "Revision", hidden: false, width: 125, sortable: true, dataIndex: 'revision'},
{header: "Scan", hidden: false, width: 125, sortable: true, dataIndex: 'scan'},
{header: "Status Date", width: 75, sortable: true, dataIndex: 'statusDate'},
{header: "Frame", hidden: false, width: 75, sortable: true, dataIndex: 'frame'},
{header: "Loc", hidden: false, width: 75, sortable: true, dataIndex: 'loc'},
{header: "Status", width: 75, sortable: true, dataIndex: 'status'},
{header: "Action", width: 150, sortable: false,dataIndex:'action'}
],
stripeRows: true,
autoExpandColumn: 'auto-expand-column-acct-maint',
region: 'center',
margins : '0 0 0 0',
header : false,
border: false,
title:'Results Panel'
});