This is a migrated thread and some comments may be shown as answers.

[Solved] How to change the Cell backgroundColor

0 Answers 6 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Priya
Top achievements
Rank 1
Priya asked on 28 Mar 2013, 07:47 AM
Hai Team,

     I am using Ajax binding in  telerik grid mvc3.how to change the Background color of a cell in jquery.


  columns.Bound(x => x.CSOverall)
              .ClientTemplate(string.Format(@"<#= BindDataForCS(CSOverall,this) #>"))
        .Title("CS") 
        .Width(0);


Jquery Fuction for ClientTeplate:

 var BindDataForCS = function (CSOverall, e) {
If(CSOverall>=80)
{   
//Cell backgroundcollor red.

}
else If(CSOverall>=60)
{   
//Cell backgroundcollor Green

}

var div = '';
        div = "<div >" + CSOverall + "</div>";
        return div

}

I try to set Div background color..but it is not set to overall cell..It set to Partially inside the cell...


Tags
Grid
Asked by
Priya
Top achievements
Rank 1
Share this question
or