Skip to main content
A newer version of this page is available. .

How to: Change the Style Settings of Individual Data Cells

In this example, the ASPxGridView.HtmlDataCellPrepared event is handled to highlight the Budget column’s cells whose values are less than 100,000.

The image below shows the result:

HtmlDataCellPrepared

protected void ASPxGridView1_HtmlDataCellPrepared(object sender,
    DevExpress.Web.ASPxGridViewTableDataCellEventArgs e) {
    if (e.DataColumn.FieldName != "Budget") return;
    if (Convert.ToInt32(e.CellValue) < 100000)
        e.Cell.BackColor = System.Drawing.Color.LightCyan;
}