PDA

View Full Version : [CLOSED] GridPanel Row Background Color Change Conditionally



ebeker
Feb 07, 2014, 10:19 PM
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

Vladimir
Feb 08, 2014, 7:19 AM
You need to use GetRowClass of GridView
Please see
http://examples2.ext.net/#/GridPanel/Miscellaneous/Marking_Records/

ebeker
Feb 08, 2014, 5:55 PM
You need to use GetRowClass of GridView
Please see
http://examples2.ext.net/#/GridPanel/Miscellaneous/Marking_Records/


I could not figure it out....the example gives you the marking the new record, not conditionally.

Vladimir
Feb 08, 2014, 6:10 PM
GetRowClass accept record record as argument, record contains data


var getRowClass = function (record) {
if (record.data.price > 50) {
return "red-row-class";
}
};

ebeker
Feb 14, 2014, 5:45 PM
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.