Loading ...
Sorry, an error occurred while loading the content.

DataTable Sorting: how to bypass a special row

Expand Messages
  • garcia_iglesias
    Hello everyone! I have a DataTable for displaying numbers with every column sortable and it has one of the rows for the total. I need to have the total row
    Message 1 of 2 , Mar 31, 2008
    • 0 Attachment
      Hello everyone!
      I have a DataTable for displaying numbers with every column sortable
      and it has one of the rows for the total. I need to have the "total"
      row always being the first row no matter what sorting do I apply to
      any of the columns. Is there some way of doing this?

      Thank you and sorry for my bad english.
    • Satyam
      Check the documentation about custom sorting. You could write your own sorting function that will have to recognize the totals row somehow and return a value
      Message 2 of 2 , Apr 1, 2008
      • 0 Attachment
        Check the documentation about custom sorting.  You could write your own sorting function that will have to recognize the totals row somehow and return a value such that it is always less than any other row.  You could also add an additional tbody to the HTML table, but if the DataTable structure changes in the future, this might now work any longer.

        -------
        Mira en la documentacion, como se escribe una funcion de ordenamiento propia.  Haz una funcion que pueda reconocer la fila con los totales y siempre responda que es menor que cualquier otra conque la compare.  Podrias tambien agregar un elemento tbody pero si en algun momento en el futuro cambia la forma en que el componente manipula la tabla, te puedes encontrar conque ya no funciona.

        Satyam
        --------- Mensaje Original --------
        De: ydn-javascript@yahoogroups.com
        Para: "ydn-javascript@yahoogroups.com" <ydn-javascript@yahoogroups.com>
        Asunto: [ydn-javascript] DataTable Sorting: how to bypass a special row
        Fecha: 31/03/08 20:36


        Hello everyone!
        I have a DataTable for displaying numbers with every column sortable
        and it has one of the rows for the total. I need to have the "total"
        row always being the first row no matter what sorting do I apply to
        any of the columns. Is there some way of doing this?

        Thank you and sorry for my bad english.


        ------------------------------------

        Yahoo! Groups Links

        <*> To visit your group on the web, go to:
        http://groups.yahoo.com/group/ydn-javascript/

        <*> Your email settings:
        Individual Email | Traditional

        <*> To change settings online go to:
        http://groups.yahoo.com/group/ydn-javascript/join
        (Yahoo! ID required)

        <*> To change settings via email:
        mailto:ydn-javascript-digest@yahoogroups.com
        mailto:ydn-javascript-fullfeatured@yahoogroups.com

        <*> To unsubscribe from this group, send an email to:
        ydn-javascript-unsubscribe@yahoogroups.com

        <*> Your use of Yahoo! Groups is subject to:
        http://docs.yahoo.com/info/terms/

      Your message has been successfully submitted and would be delivered to recipients shortly.