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

Re: [ydn-javascript] Re: Continuous Update of DataTable

Expand Messages
  • Satyam
    The sortedBy configuration attribute only signals the DataTable which column to highlight as sorted. You could use method sortColumn to sort the data again
    Message 1 of 17 , Jan 30, 2008
      The sortedBy configuration attribute only signals the DataTable which column
      to highlight as sorted. You could use method sortColumn to sort the data
      again when it is received but doing it on the client side is not
      particularly efficient and will produce an extra blinking on the data. The
      best is to have the server do the sorting since database servers are highly
      optimized to do so. You can use the sortedBy configuration attribute and
      append them as arguments to the URL and have the server read them and modify
      the SELECT statement accordingly. You reach the sortedBy attributes with
      the get method: myDataTable.get('sortedBy') (get is inherited from Element
      so it is not documented along the DataTable).

      Satyam

      ----- Original Message -----
      From: "ayigal" <asaf.yigal@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Wednesday, January 30, 2008 12:04 PM
      Subject: [ydn-javascript] Re: Continuous Update of DataTable


      > Hi,
      >
      > I'm using the "sortable" option on the datatable columns and the
      > continuous update resets the sorting that was done by the user. Is
      > there anyway to refresh the data and keep the existing sorting?
      > Alternatively is there a way to make the server do the sorting?
      >
      > Thanks,
      >
      > -- Asaf.
      >
      > --- In ydn-javascript@yahoogroups.com, "Satyam" <satyam@...> wrote:
      >>
      >> The DataTable cannot help you with that, it will replace one set of
      > data with the new one so you will have nothing to compare it with.
      > You can, though, separate the retrieval of data from its presentation
      > so that you have a chance to process it (in this case compare it with
      > a previous version of the same) and then provide it to the DataTable
      > (with the extra 'color' information added) for it to display it. Once
      > the DataTable gets the data, it can use a formatter function on any of
      > its columns to read the color information and paint the row whichever
      > way you want it.
      >>
      >> Satyam
      >> ----- Original Message -----
      >> From: nihar bhatt
      >> To: ydn-javascript@yahoogroups.com
      >> Sent: Friday, January 04, 2008 1:51 PM
      >> Subject: Re: [ydn-javascript] Continuous Update of DataTable
      >>
      >>
      >> Thanks !!! that was my fault...
      >>
      >>
      >> Well now the scenario is
      >>
      >> When Old data in a data table changes by the new Response at that
      > time i
      >> want to make a check ... like comparing values..... old with new
      > and based on that i
      >> want to change color of a particular cell.
      >>
      >> like in Market watch for stock market......
      >>
      >> if the rate of a particular company changes then we have to flash
      > that cell to indicate the change in a stock price.
      >>
      >> Hope you understand the problem
      >>
      >>
      >> Thanks .....
      >> ntimesc
      >>
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.516 / Virus Database: 269.19.16/1250 - Release Date:
      > 29/01/2008 22:20
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.