Nikhil Sharma

Latest News

  1. Home
  2. Blog
how to customize datatable column value number to string or gernal Jquery

how to customize datatable column value number to string or gernal Jquery

how to customize datatable column value number to string or gernal Jquery

As Per My knowledge in javascript  what would be the best approach here?

  1. Tweak the string sorting function to detect the number thousands formatted case, and do the comparison (I guess this would be pretty slow on large data set).
  2. Provide a numerical sorting function dedicated for number thousands formatted? In that case
    • how would you code that?
    • how could I indicate to the core sorting function, to use this special numerical sorting function?
       

Try this code for  customizeData


customizeData: function ( data ) {
        for (var i=0; i<data.body.length; i++){
            for (var j=0; j<data.body[i].length; j++ ){
                data.body[i][j] = '\u200C' + data.body[i][j];
            }
        }

Author: Nikhil Sharma

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis.

0 Comments

Leave a reply