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

Massaging checkbox 'value' attribute in datatable column definition

Expand Messages
  • kittumani
    I would like to add the value column to the checkbox , {key: select , label: , formatter: checkbox }, and massage the value
    Message 1 of 2 , Feb 4, 2009
    • 0 Attachment
      I would like to add the value column to the checkbox ,

      {key:"select", label:'<input type="checkbox" value:"" />',
      formatter:'checkbox'},

      and massage the value with the data returned from JSON like

      fields: [
      {key:"select", parser:YAHOO.util.DataSource.parseBoolean,
      value:"timeFromJSON"}
      ]

      Thoughts !
    • Satyam
      You will then have to write your own formatter since the built-in formatter does not set the value attribute of the checkbox. The formatter has access to the
      Message 2 of 2 , Feb 5, 2009
      • 0 Attachment
        You will then have to write your own formatter since the built-in
        formatter does not set the value attribute of the checkbox. The
        formatter has access to the full record for that row, whether that
        column is shown or not, so you should be able to pick the value from any
        field for its value. However, the full record is also available at any
        time later on such as when the checkbox is clicked upon so, quite often,
        there is no point in replicating the information available in the Record
        object in the UI elements when you can just as well go to the original.

        Satyam


        kittumani wrote:
        > I would like to add the value column to the checkbox ,
        >
        > {key:"select", label:'<input type="checkbox" value:"" />',
        > formatter:'checkbox'},
        >
        > and massage the value with the data returned from JSON like
        >
        > fields: [
        > {key:"select", parser:YAHOO.util.DataSource.parseBoolean,
        > value:"timeFromJSON"}
        > ]
        >
        > Thoughts !
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        > ------------------------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - www.avg.com
        > Version: 8.0.233 / Virus Database: 270.10.17/1934 - Release Date: 02/04/09 08:24:00
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.