Results 1 to 4 of 4

Thread: Highlight/ change background color of cell using another data

  1. #1

    Default Highlight/ change background color of cell using another data

    Hi,

    I have 2 columns like TPF and TPF_FLAG which i get from my rest service and displayed in grid. TPF_FLAG will be 0 or 1 which indicates that should i change the background color of TPF cell or not. If it 1 that TPF cell background should be red. How do i do this?

  2. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    908
    Answers
    105

    Default

    Column renderer receives value, meta data and record as its arguments. You can get "TPF_FLAG" field value from the record passed to the renderer.

  3. #3

    Default

    How do i change the background color of that cell?

  4. #4
    Sencha User
    Join Date
    Apr 2013
    Posts
    908
    Answers
    105

    Default

    You can set tdCls and tdStyle properties of the metaData object you get in your renderer function (see the doc for more info).

Similar Threads

  1. Replies: 1
    Last Post: 30 Mar 2014, 11:11 PM
  2. Change property grid cell options, e.g. background color
    By alexander.urban in forum Ext: Q&A
    Replies: 1
    Last Post: 22 Nov 2013, 3:01 PM
  3. Change property grid cell options, e.g. background color
    By alexander.urban in forum Sencha Architect 3.x: Q&A
    Replies: 0
    Last Post: 21 Nov 2013, 12:14 AM
  4. How do I change background-color on a cell in a ListView?
    By ZyBeR in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 18 Jun 2010, 7:22 AM
  5. Change Cell Background Color Using the Value of Another Column
    By rommirommi in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 16 May 2009, 12:04 PM

Tags for this Thread

Posting Permissions

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