Results 1 to 2 of 2

Thread: How to identify which column renderer is running for?

  1. #1
    Ext JS Premium Member
    Join Date
    Jun 2011
    Location
    Ottawa, Ontario, Canada
    Posts
    123
    Answers
    4

    Default Answered: How to identify which column renderer is running for?

    I have a renderer function for Grid columns and and I would like to identify which column it is running for. But based on renderer description in doc

    function(value, metaData, record, rowIndex, colIndex, store)

    there is no reference to column itself. columnIndex is not an option because it changes when one of the columns locked.
    And 'this' refers to entire panel, not to the column.

    Thanks
    Paul

  2. columnIndex is not an option because it changes when one of the columns locked.
    Does grid.columns[columnIndex] not get you the right column in these circumstances?

    If that doesn't work then I guess you'll need to use a different renderer for each column. Perhaps you could use Ext.Pass to bind an identifier of your choice as the first argument passed to the renderer?

    http://docs.sencha.com/ext-js/4-0/#!...xt-method-pass

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    columnIndex is not an option because it changes when one of the columns locked.
    Does grid.columns[columnIndex] not get you the right column in these circumstances?

    If that doesn't work then I guess you'll need to use a different renderer for each column. Perhaps you could use Ext.Pass to bind an identifier of your choice as the first argument passed to the renderer?

    http://docs.sencha.com/ext-js/4-0/#!...xt-method-pass

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •