[CLOSED] Render (or prepare) grid cell

  1. #1

    [CLOSED] Render (or prepare) grid cell

    Dear all,
    I have a grid with two columns, filled by a store.
    I would like to display a specified value in the first cell depending on the second cell's value.
    IE:

    COL1 | COL2

    1 | 2
    3 | 6
    4 | 2
    9 | 8

    When col2.value is 2 I'd like to render col1 as following, putting a star '*' instead of its value:


    COL1 | COL2


    * | 2
    3 | 6
    * | 2
    9 | 8

    Is it possible to do this with a renderer (or with something else)?
    Thanks in advance,
  2. #2

    RE: [CLOSED] Render (or prepare) grid cell

    Hi,

    Try the following renderer for first column
    function myRenderer(value, meta, record){return record.get('COL2') == '2' ? '*' : value;}

Similar Threads

  1. Render html in gridpanel cell?
    By Tbaseflug in forum 2.x Help
    Replies: 1
    Last Post: May 17, 2012, 2:52 PM
  2. [CLOSED] GridPanel Dynamic Cell Render
    By VALUELAB in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 17, 2011, 10:39 AM
  3. [CLOSED] Slow loading of Grid Command with Prepare functions
    By CMA in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 13, 2011, 2:54 PM
  4. [CLOSED] Grid Render Cell is empty
    By sharif in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 28, 2010, 2:19 AM
  5. Replies: 2
    Last Post: Feb 19, 2009, 2:02 PM

Posting Permissions