GridPanel - JS summaryrenderer accessing record data

  1. #1

    GridPanel - JS summaryrenderer accessing record data

    Hello,

    I am wanting to combine the value from several fields to make up one of the columns in the Group sumnary of a gridpanel.

    I have created a JS function but I am not sure on how I extract the values from the data parameter:

    e.g.


    var TollGateRenderer = function (v, params, data) {
             var l = 'Tollgate ' + <fieldvalue1> + 'some text' + <fieldvalue2>;
             return l;
    
         };
    <fieldvalue1> and <fieldvalue2> are where I would like to extract a field value from the 'data' parameter, but I have not been able to work out the correct way to do these.

    I am calling the function using <SummaryRenderer fn="TollGateRenderer" /> as part of the GroupingSummaryColumn.

    any help would be appreciated.

    thanks
  2. #2
    Please mark this as solved, finally cracked it:

    I need to use data.data.<fieldname> as in data.data.Tollgate_ID

Similar Threads

  1. Replies: 1
    Last Post: May 22, 2012, 3:09 PM
  2. [CLOSED] SummaryRenderer Fn in 2.0
    By gets_gui in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 12, 2012, 2:46 PM
  3. Accessing Clipboard images data
    By decho in forum 1.x Help
    Replies: 0
    Last Post: Aug 28, 2011, 2:43 PM
  4. Replies: 5
    Last Post: Aug 13, 2010, 6:36 AM
  5. Ext.data.Record constructor
    By mthird in forum 1.x Help
    Replies: 0
    Last Post: Oct 14, 2008, 4:05 PM

Tags for this Thread

Posting Permissions