Var cmItems = [];
Var cmConfig = {};
CmItems. push (new Ext. grid. RowNumberer ());
CmItems. push (sm );
CmItems. push ({header: 'id', dataIndex: 'id', hidden: true, sortable: true });
CmItems. push ({header: 'document number', dataIndex: 'no', sortable: true });
CmItems. push ({header: 'org ', dataIndex: 'orgname', sortable: true });
CmItems. push ({header: 'reporting date', dataIndex: 'reportdate', sortable: true });
Var priceTypeList = results. root
For (var I = 0; I <priceTypeList. length; I ++ ){
CmConfig = {header: priceTypeList [I]. priceType, dataIndex: 'pricetype '+ priceTypeList [I]. id, width: 100, sortable: true}
CmItems. push (cmConfig );
}
CmItems. push ({header: 'note', dataIndex: 'note', width: 150, sortable: true });
CmItems. push ({header: 'creator ', dataIndex: 'createusername', sortable: true });
CmItems. push ({header: 'creation date', dataIndex: 'createdate', width: 120, sortable: true });
CmItems. push ({header: 'modifier ', dataIndex: 'updateusername', sortable: true });
CmItems. push ({header: 'modify date', dataIndex: 'updatedate', width: 120, sortable: true });
CmItems. push ({header: 'status', dataIndex: 'state', sortable: true });
// Information Column
Var cm = new Ext. grid. ColumnModel (cmItems );