How to: Render a Different Content From Default Exporting
This example shows you 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.
Protected Sub grid_ExportRenderBrick(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridViewExportRenderingEventArgs)
Dim dataColumn As GridViewDataColumn = TryCast(e.Column, GridViewDataColumn)
If e.RowType = GridViewRowType.Data AndAlso dataColumn IsNot Nothing AndAlso dataColumn.FieldName = "CompanyName" Then
e.BrickStyle.ForeColor = If(CDec(e.GetValue("ProductAmount")) > 1000, Color.Green, Color.Red)
e.BrickStyle.BackColor = Color.LightYellow
Protected Sub btn_Click(ByVal sender As Object, ByVal e As EventArgs)
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.