numaric sort for monitor detail page

  • numaric sort for monitor detail page

    Posted by helplakmal on January 28, 2014 at 14:51

    hi,

    I think ascending and descending sort in data column in “Monitor Details” should be numaric sort.because most of the time we received numeric values as data and numeric sort has greater importance than string sort in this case.so i changed few lines in code to get that and it is working fine i guess.

    551c551,552
    <                               $order = array('field' => 'tagente_estado.datos', 'order' => 'ASC');
    ---
    >                               // $order = array('field' => 'tagente_estado.datos', 'order' => 'ASC');
    >                               $order = array('field' => 'CAST(tagente_estado.datos AS DECIMAL(12,2))', 'order' => 'ASC');
    555c556,557
    <                               $order = array('field' => 'tagente_estado.datos', 'order' => 'DESC');
    ---
    >                               // $order = array('field' => 'tagente_estado.datos', 'order' => 'DESC');
    >                               $order = array('field' => 'CAST(tagente_estado.datos AS DECIMAL(12,2))', 'order' => 'DESC');
    

    Regards

    helplakmal replied 10 years, 9 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.