javascript - Custom "cellfilter" in Angular js -


I am working with NG-Grid in Angular JS. I have this line of code that defines the type of filter.

important column In the value "H" "L" and "M" is the normal (alphabetical) sorting, I can get a type of H-L-M but as "H-ML" One way to define filters is by

Kiss Also help is appreciated !! Thanksgiving

Use a custom sort function:

  var result = 1; var test = "HML"; function impSortFn (a, b) {a = test.indexOf (a); b = test.indexOf (b); if (a = = B) returns 0; if (A and lieutenant; b) return -1; return result;} $ Scope.gridOptions = {data: 'myData', columnDefs: [[field: 'name', displayName: 'name' }, {Field: 'age', displayName: 'age'}, {field: 'imp', displayName: 'important', sortfane: importfo}]   

< / Div>

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -