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

Re: Running custom sort function as initial sort?

Expand Messages
  • daniel
    Thanks! Extremely helpful. ... as it ... it. It is ... myColumnDefs. ... not that ... sorted,
    Message 1 of 3 , Aug 30, 2007
    • 0 Attachment
      Thanks! Extremely helpful.



      --- In ydn-javascript@yahoogroups.com, "Satyam" <satyam@...> wrote:
      >
      > The same issue came just yeasterday.
      >
      > The sortedBy notifies the DataTable how the data is already sorted,
      as it
      > often is when coming from a database, it is not a command to sort
      it. It is
      > sortedBt, not sortBy, not a command at all.
      >
      > You can, after the table is rendered, do:
      >
      > myDataTable.sortColumn(myDataTable.getColumn(2));
      >
      > or any other column number, in the order they are declared in
      myColumnDefs.
      > Don't use the column key, though getColumn accepts a string, it is
      not that
      > column key value but the id of an HTML element in the column to be
      sorted,
      > as would be available when listening to a mouseclick or such.
      >
      > Satyam
      >
      > ----- Original Message -----
      > From: "daniel" <dep@...>
      > To: <ydn-javascript@yahoogroups.com>
      > Sent: Thursday, August 30, 2007 6:31 PM
      > Subject: [ydn-javascript] Running custom sort function as initial sort?
      >
      >
      > >I have the following line:
      > >
      > > myDataTable = new YAHOO.widget.DataTable("myContainer", myColumnDefs,
      > > myDataSource, {sortedBy:{key:"cdate", dir:"desc"}});
      > >
      > > But I actually want to run that column's custom sort function instead.
      > > How can I accomplish this?
      > >
      > > dep
      > >
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > > --
      > > No virus found in this incoming message.
      > > Checked by AVG Free Edition.
      > > Version: 7.5.484 / Virus Database: 269.12.12/979 - Release Date:
      > > 29/08/2007 20:21
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.