Angularjs ui-grid sorting table according to a given column name -


i using ui-grid version v3.0.0-rc.21-1d9f81f - 2015-05-01 , trying sort given grid according given column name. cannot sort externally (from javascript code), defining , clicking on grid's headers.

is possible in version sort grid's data according grid's column name via javascript code?

if want sort based on column/field before grid loaded, can using angular orderby filter whenever data retrieved server.

$filter('orderby')(array, expression, reverse) 

or if wanted sort grid @ initial state, can define in columndef sort property

{             field: 'gender',             sort: {               direction: uigridconstants.asc,               priority: 0,             } } 

take @ plnkr http://plnkr.co/edit/4qqgi76rqpyxbrgbcbyx?p=preview


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -