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

Re: DataTable not sorting integers properly right away.

Expand Messages
  • y_lsmith
    ... Jamie, I guess I still don t understand what you re trying to say. Do you have a page we could look at? If not, * Are you using an HTMLTABLE type
    Message 1 of 6 , Jun 2, 2008
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "Jamie" <jamierytlewski@...> wrote:
      >
      > I am not sure if you guys are understanding what I am trying to say.
      > The sorting and default sorting works fine (great even) with dates and
      > text, even from the start. It is numbers that it is having problems
      > with if it is sorted by a number by default.
      >
      > var myDataTable = new YAHOO.widget.DataTable("dataTable", myColumns,
      > myDataSource,
      > {sortedBy:{key:"school_name",dir:"asc"}});
      >
      > The code above if I change to a column with a number, the table will
      > not sort properly on default. I have to click another field and then
      > back to the id and it will sort properly. The date and string sort
      > fine from the beginning, not the numbers.
      >
      > Thanks,
      >
      > Jamie
      >

      Jamie,

      I guess I still don't understand what you're trying to say. Do you
      have a page we could look at? If not,
      * Are you using an HTMLTABLE type DataSource for progressive enhancement?
      * Does your DataSource fields definition for the numeric column use
      the parser DataSource.parseNumber?
      * Is the existing table, before any JavaScript executes, sorted? If
      so, by which column?
      * Does the DataTable's constructor parameter sortedBy match the column
      the existing table is sorted by? Or correctly omitted if the table is
      not pre-sorted?
      * Have you tried removing the sortedBy configuration?
      * Does the DataTable sort incorrectly in response to a column head
      click after initialized with data pre-sorted by a column other than
      the numeric column? By the numeric column? With or without the
      sortedBy config?

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