javascript - get already sorted column names in ext js grid -


i'm using below code in order sorted column names grid using ext js grid(mygrid) working correctly

function onclick(){      var grid = mygrid.getstore().sortinfo.field;      alert("grid") } 

i'm getting error "object null or not object"

please help

try sort store sencha store function.

sencha api: sort store

//sort single field mystore.sort('myfield', 'desc');  //sorting multiple fields mystore.sort([{     property : 'age',     direction: 'asc' }, {     property : 'name',     direction: 'desc' }]);  // sort store using existing sorter set. mystore.sort(); 

in case:

mygrid.getstore().sort('myfield', 'desc'); 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -