Front end to add on Entity Framework ASPxGridView Model:
OnHtmlDataCellPrepared="ASPxGridView1_HtmlDataCellPrepared"
Back to add:
// Add this in the Namespace area, not inside the Page_Load function public bool ProcessSelectionChangedOnServer { get; set; } protected void ASPxGridView1_HtmlDataCellPrepared(object sender, DevExpress.Web.ASPxGridViewTableDataCellEventArgs e) { // if statements go here e.Cell.BackColor = System.Drawing.Color.LightCyan; }
Code Result:
All cell colors change to LightCyan
Literature:
ASPxGridView.HtmlRowPrepared Event
TreeListSettingsBehavior.ProcessSelectionChangedOnServer Property
source share