ENTITY / LINQ / ASP.NET: Rules for adding ASPxGridView

I am working on a small project that uses the Entity Framework, and I am currently studying ASPxGridView, however I cannot find anything on the Internet that involves adding rules to the columns, which then either show an icon or select a row depending on established rules.

Something like this: https://demos.devexpress.com/ASPxGridViewDemos/Rows/ConditionalFormatting.aspx

If anyone could send me any links that they can find that can help me point in the right direction, that would be appreciated.

Thanks.

+5
source share
1 answer

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

+4
source

Source: https://habr.com/ru/post/1242854/


All Articles