This project has moved. For the latest updates, please go here.

Row background color

Dec 8, 2016 at 10:33 PM
Hi

Overall it is a very great grid and i would really appreciate your hard work on this.

I have a requirement - based on a column value i need to change the color of the grid row. How to do this? I tried the following way by referring to the documentation. But it is not setting the background color. it would be great if it is possible to set the entire row color, if not a particular column. Please help me.

Form_Onload: function () {
   window.parent.DCrmEgGridRowOnload = DCrmEgGridRowOnload;
}

DCrmEgGridRowOnload: function (rowData, entityinfo) {
   var fieldUrgency = rowData.Fields[2];
   var fieldStatus = rowData.Fields[1];
   alert(fieldStatus.Value);
   //if (fieldStatus.Value != "868890002") {
       for (var i = 0; i < rowData.Fields.length; i++) {
           var field = rowData.Fields[i];
           field.BackgroundColor = '#CCCCCC';//'lightyellow'
       //field.ForgroundColor = '#CCCCCC';
       }
   //}
},

Thanks