Hi,
I have a RadGrid with a few columns:
<telerik:GridBoundColumn HeaderText="LOC" DataField="HomeLoc" UniqueName="HomeLoc" ReadOnly="True" SortExpression="HomeLoc" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="YTD HRS" DataField="TotHrs" UniqueName="TotHrs" ReadOnly="True" SortExpression="TotHrs" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" >
</telerik:GridBoundColumn>
When I export RadGrid to excel I need based on criteria highlight entire row in excel:
if TotHrs > 500
highlight entire row.
How it can be done.I try event ExportCellFormatting but it is not working.
protected void PSEmplGrid_ExportCellFormatting(object sender, ExportCellFormattingEventArgs e)
{
GridDataItem item = e.Cell.Parent as GridDataItem;
if (e.FormattedColumn.UniqueName == "TotHrs")
{
e.Cell.Style["background-color"] = "Red";
}
}
Thank you.