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

Re: Datatable formatter

Expand Messages
  • jennykhan
    Hi there, As of the 2.3.0 release, you should be able to access other data fields in your formatter function with something like this: var cbValue =
    Message 1 of 2 , Aug 1, 2007
    • 0 Attachment
      Hi there,

      As of the 2.3.0 release, you should be able to access other data
      fields in your formatter function with something like this:

      var cbValue = oRecord.getData("order");

      IIRC, pre-2.3.0 implementations would need to use something like this:

      var cbValue = oRecord.order;

      Hope that helps,
      Jenny



      --- In ydn-javascript@yahoogroups.com, "brad_balmer" <bbalmer@...> wrote:
      >
      > For a column I want to add show a checkbox but use the id value of the
      > current data column but the value of another data column.
      >
      > How can I gain access to other column data in the existing row?
      >
      > var checkBoxFormatter = function(elCell, oRecord, oColumn, oData) {
      > var id = oData;
      > var cbId = 'checkbox-'+id;
      > var cbValue = "HERE IS WHERE I NEED THE order value
      > elCell.innerHTML = "<input type='checkbox' id='"+cbId+"'
      > name='"+cbId+"' value='"+cbValue+"'/>";
      >
      > }
      >
      > Thanks
      >
      > Again, how can I get the order value when I'm formatting the id column?
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.