how to enable grid geader sorting context menu and catch the click event on it ?
how to enable grid geader sorting context menu and catch the click event on it ?
hi,
I have a grid panel and there is a header context menu, but the sorting menu gets disabled.
ow can I enable the sorting ASC/DES menu and handle the clicking event on it ?
besides, the sorting is on grid's datastore ?
here is the code for the grid.
///////////////////////////////////////////////////////////////////
function snpGrid_universal (divId, JsonData)
{
var len = JsonData.col_headers.length;
var dataStore = new Ext.data.Store ({
reader: new Ext.data.JsonReader ({
root: 'snpRows',
totalProperty: 'totalSnp',
id: 'snpId'
},
JsonData.snpRows_index
)
});
dataStore.loadData (JsonData);
var colModelArray = [];
for (var i=0; i < len; i++){
colModelArray.push(
{header: JsonData.col_headers[i], dataIndex: JsonData.snpRows_index[i], tooltip: JsonData.col_header_desc[i], width: JsonData.col_widths[i], align:JsonData.col_aligns[i], sortable: true }
);
}
var columnModel = new Ext.grid.ColumnModel (colModelArray );