BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<style>
.below-25 {
background-color: orangered;
}
.below-35 {
background-color: yellow;
}
.above-35 {
background-color: greenyellow
}
</style>
<EjsGrid DataSource="@Orders" AllowPaging="true">
<GridEvents QueryCellInfo="QueryCellInfoHandler" TValue="Order"></GridEvents>
……………………….
</EjsGrid>
<style>
.e-grid .e-gridcontent .e-rowcell.below-35 {
color: orangered;
}
………………………
</style>
@code{
……..
public void QueryCellInfoHandler(QueryCellInfoEventArgs<Order> args)
{
if(args.Data.Freight > 35)
{
args.Cell.AddClass(new string[] { "below-35" });
}
……………………….
}
}
|
public void QueryCellInfoHandler(QueryCellInfoEventArgs<Order> args)
{
if(args.Data.Freight > 35)
{
args.Cell.SetAttribute("style", "color:green");
}
else if(args.Data.Freight > 25)
{
args.Cell.SetAttribute("style", "color:yellow");
}
………………………………
} |