[CLOSED] GridPanel Row Background Color Change Conditionally

  1. #1

    [CLOSED] GridPanel Row Background Color Change Conditionally

    I have gridpanel that has 10 columns and i want to change some of the rows' background color under condition ,

    the conditioner column is a CheckColumn and datatype is Boolean, no need to do it dynamically , it can be on store load.

    if conditioner column.value=False
    set row background to RED


    Javascript or codebehind code would help me a lot

    Thank you in advance
    Last edited by Daniil; Feb 14, 2014 at 1:47 PM. Reason: [CLOSED]
  2. #2
    You need to use GetRowClass of GridView
    Please see
    https://examples2.ext.net/#/GridPane...rking_Records/
  3. #3
    Quote Originally Posted by Vladimir View Post
    You need to use GetRowClass of GridView
    Please see
    https://examples2.ext.net/#/GridPane...rking_Records/

    I could not figure it out....the example gives you the marking the new record, not conditionally.
  4. #4
    GetRowClass accept record record as argument, record contains data
    var getRowClass = function (record) {
       if (record.data.price > 50) {
           return "red-row-class";
       }
    };
  5. #5
    Quote Originally Posted by Vladimir View Post
    GetRowClass accept record record as argument, record contains data
    var getRowClass = function (record) {
       if (record.data.price > 50) {
           return "red-row-class";
       }
    };
    Thank you worked out good.

Similar Threads

  1. [CLOSED] Gridpanel - group header - Dyamically change background color
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 14
    Last Post: Jul 24, 2013, 12:37 PM
  2. Change GridPanel Cell background color
    By mis@adphk.com in forum 2.x Help
    Replies: 1
    Last Post: Mar 19, 2013, 1:43 AM
  3. [CLOSED] Change TreePanel background color and toolbar color
    By jchau in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Dec 07, 2012, 4:42 PM
  4. Replies: 12
    Last Post: Jun 17, 2009, 12:07 PM
  5. Change Tab background color or background image
    By georgelanes in forum 1.x Help
    Replies: 0
    Last Post: Nov 06, 2008, 3:55 PM

Tags for this Thread

Posting Permissions