I am working on a small project which uses Entity Framework and I am currently learning about ASPxGridView, however, I cannot seem to find anything on the internet which relates to adding rules to columns which then shows either an icon or highlights the row depending on the rules set.
Something like this: https://demos.devexpress.com/ASPxGridViewDemos/Rows/ConditionalFormatting.aspx
If anyone could send me any references that they can find that may help point me in the right direction, it would be appreciated.
Thanks.
Front end to add on the Entity Framework ASPxGridView Model:
OnHtmlDataCellPrepared="ASPxGridView1_HtmlDataCellPrepared"
Back end 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 background colors change to LightCyan
References:
ASPxGridView.HtmlRowPrepared Event
TreeListSettingsBehavior.ProcessSelectionChangedOnServer Property
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With