Adding columns to a table is implemented in the colunms of the definition of the grid:
1. Line serial number
{header: ' Serial number ', Xtype: ' Rownumberer ', width:60, align: ' center ', sortable:false}
If you want to do the table additions and deletions, and refresh the number of columns:
Adding no tube, the table sequence will automatically achieve the self increase;
If you delete, you need to invoke the Refresh view implementation:
Ext.each (Reconrds, function (record) {
EXT.GETCMP (' Potenshow '). Store.remove (record);
})
EXT.GETCMP (' Potenshow '). GetView (). Refresh (); After a row of records is deleted, the row sequence number is reordered;
2. check box
SelModel:Ext.create (' Ext.selection.CheckboxModel ', {}),
3. Extended Column
The extended column is not displayed at all times, but preceded by a "+" number in front of each line, when clicked on the plus sign expands, it is appropriate to display a larger number of columns in a table or a column with more and less important displays:
This can also be defined as a plug-in for a table:
Plugins: [
{
ptype: ' Rowexpander ',
rowbodytpl:new ext.xtemplate (
"<p style= ' position:ralative; Top:10px;font-size:12px;color: #ff0000; ' > Founder </p> ",
' <p>{CREATE_USER}</p> ',
" <p style= ' position:ralative;top:10px; Font-size:12px;color: #ff0000; ' > Creation Time </p> ",
' <p>{CREATE_TIME}</p> ',
" <p style= ' position:ralative;top:10px; Font-size:12px;color: #ff0000; ' > Remarks </p> ",
' <p>{REMARK}</p> '
)
}
]
Here the variable in brace {} is the field name in the gird data;