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

Re: [ydn-javascript] ¿Can anyone provide a simple example of how to update a column on a DataTable?

Expand Messages
  • Ferran Romero
    Thank s so much Satyam, I can change the column value as I wanted. It could sounds strange that I would update the view but not the underlying data. I need to
    Message 1 of 1 , Oct 8, 2007
    • 0 Attachment
      Thank's so much Satyam, I can change the column value as I wanted.

      It could sounds strange that I would update the view but not the underlying data. I need to provide a list of costumer wich to send a information mail, but I would only sent it once. Well, I will update the database, but there's no need to return the result of this update into XML and then process by the client. I think that is better to update this flag updating the datable.

      Espero haver-me explica't ;-)

      Best regards,

      Ferran.


      ----- Original Message ----
      From: Satyam <satyam@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Friday, October 5, 2007 3:56:52 PM
      Subject: Re: [ydn-javascript] ¿Can anyone provide a simple example of how to update a column on a DataTable?

      I'm not sure I understand what you mean, it sounds strange that you would update the view but not the underlying data, so I wonder if I am not understanding what is it that you want.
       
      First of all, there is the DOM.  The rows are easily identified: id="yui-dt0- bdrow1-cell4" is the id for a cell in the first datatable, second row, 5th column.  You could use YAHOO.util.Dom. get() to reach any of the cells.
       
      Then, you have the RecordSet, which is where the internal data of the DataTable is stored.  You can get any record within the DataTable calling getRecord and providing any of the several arguments that getRecord takes and then do a getData() (with no arguments) to pick the record as a simple plain object, update the data and the update the record via updateRow. This last function takes the same sort of argument getRecord took in the first place and then an object literal such as that returned by getData() with no arguments.
       
      Finally, I am wondering if by update you mean that you want to change the way it is shown by default on creation. If so, what you want is to use the formatter function so that you can show it any way you want it.
       
      Fins aviat
       
      Satyam
       
      ----- Original Message -----
      Sent: Friday, October 05, 2007 11:17 AM
      Subject: [ydn-javascript] ¿Can anyone provide a simple example of how to update a column on a DataTable?

      Hi all,

      I would to update a column of a DataTable that is not enabled for inline editing, so I would do it directly by code. I have not need to update this new value into database, I have only need to update the column.

      ¿Can anyone provide me a basic example?

      Thank's in advice,

      Ferran.


      Be a better Heartthrob. Get better relationship answers from someone who knows.
      Yahoo! Answers - Check it out.

      No virus found in this incoming message.
      Checked by AVG Free Edition.
      Version: 7.5.488 / Virus Database: 269.14.1/1050 - Release Date: 04/10/2007 17:03



      Be a better Globetrotter. Get better travel answers from someone who knows.
      Yahoo! Answers - Check it out.
    Your message has been successfully submitted and would be delivered to recipients shortly.