ASPxGridViewExportRenderingEventArgs.BrickStyle Property
Gets the style settings used to paint report bricks.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
BrickStyle | A BrickStyle object that contains style settings. |
Remarks
Use the BrickStyle property to specify the appearance of report bricks. You can specify the foreground, background and border colors for bricks, the font, border side settings and text formatting information.
Example
This example shows how to draw company names in an exported document based on the number of products. Company names are painted in Green if the product count is greater than 1,000. Otherwise, company names are painted in Red.
The image below shows the result:
using DevExpress.Web.Export;
using DevExpress.Web.ASPxGridView;
protected void grid_ExportRenderBrick(object sender, DevExpress.Web.ASPxGridViewExportRenderingEventArgs e) {
GridViewDataColumn dataColumn = e.Column as GridViewDataColumn;
if(e.RowType == GridViewRowType.Data && dataColumn != null && dataColumn.FieldName == "CompanyName") {
e.BrickStyle.ForeColor = (decimal)e.GetValue("ProductAmount") > 1000 ? Color.Green : Color.Red;
e.BrickStyle.BackColor = Color.LightYellow;
}
}
protected void btn_Click(object sender, EventArgs e) {
grid.ExportPdfToResponse();
}
See Also