When exporting a RadGrid to excel, how do I get the backcolor of my rows to not extend infinitely. My RadGrid has 11 columns but when I export to excel, the backcolor of my alternateitemstyle extends past 11 columns. This is my RadGrid code:
<
telerik:RadGrid
ID
=
"On_Time_Receipt_Summary"
runat
=
"server"
RenderMode
=
"Lightweight"
Height
=
"700px"
Width
=
"1300px"
ShowFooter
=
"true"
OnCustomAggregate
=
"On_Time_Receipt_Summary_CustomAggregate"
OnExportCellFormatting
=
"On_Time_Receipt_Summary_ExportCellFormatting"
>
<
ClientSettings
>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"true"
/>
<
Resizing
AllowColumnResize
=
"true"
AllowRowResize
=
"true"
ClipCellContentOnResize
=
"false"
ResizeGridOnColumnResize
=
"true"
/>
</
ClientSettings
>
<
ExportSettings
ExportOnlyData
=
"true"
Excel-FileExtension
=
"xls"
Excel-Format
=
"ExcelML"
FileName
=
"On_Time_Receipt_Summary"
OpenInNewWindow
=
"true"
UseItemStyles
=
"true"
></
ExportSettings
>
<
MasterTableView
AutoGenerateColumns
=
"false"
>
<
HeaderStyle
BackColor
=
"#839DBE"
BorderStyle
=
"Solid"
Font-Bold
=
"False"
Wrap
=
"False"
ForeColor
=
"White"
Font-Names
=
"Arial"
Font-Size
=
"8pt"
BorderWidth
=
"1px"
Height
=
"50px"
/>
<
ItemStyle
BackColor
=
"White"
Font-Size
=
"8pt"
Font-Names
=
"Arial"
ForeColor
=
"Black"
Wrap
=
"False"
/>
<
AlternatingItemStyle
BackColor
=
"#e1e6ef"
Font-Size
=
"8pt"
Font-Names
=
"Arial"
ForeColor
=
"Black"
Wrap
=
"False"
/>
<
FooterStyle
BackColor
=
"#839DBE"
BorderStyle
=
"Solid"
Font-Bold
=
"False"
Wrap
=
"False"
ForeColor
=
"White"
Font-Names
=
"Arial"
Font-Size
=
"8pt"
BorderWidth
=
"1px"
Height
=
"25px"
/>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Vendor"
HeaderText
=
"Vendor"
HeaderStyle-Width
=
"65px"
FooterText
=
"Total:"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Vendor Name"
HeaderText
=
"Vendor Name"
HeaderStyle-Width
=
"225px"
></
telerik:GridBoundColumn
>
<
telerik:GridNumericColumn
DataField
=
"Total Receipt Lines"
HeaderText
=
"Total Receipt Lines"
HeaderStyle-Width
=
"50px"
DataFormatString
=
"{0:#,##0;}"
Aggregate
=
"Sum"
>
<
ItemStyle
HorizontalAlign
=
"Right"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
/>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
DataField
=
"Total Received Qty"
HeaderText
=
"Total Received Qty"
HeaderStyle-Width
=
"65px"
DataFormatString
=
"{0:#,##0;}"
Aggregate
=
"Sum"
>
<
ItemStyle
HorizontalAlign
=
"Right"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
/>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
DataField
=
"Cost Amount"
HeaderText
=
"Cost Amount"
HeaderStyle-Width
=
"70px"
DataFormatString
=
"{0:$#,##0;}"
Aggregate
=
"Sum"
>
<
ItemStyle
HorizontalAlign
=
"Right"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
/>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
DataField
=
"On Time"
HeaderText
=
"On Time"
HeaderStyle-Width
=
"50px"
DataFormatString
=
"{0:#,##0;}"
Aggregate
=
"Sum"
>
<
ItemStyle
HorizontalAlign
=
"Right"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
/>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
DataField
=
"On Time Pct"
HeaderText
=
"On Time Pct"
HeaderStyle-Width
=
"50px"
UniqueName
=
"OnTimePct"
Aggregate
=
"Custom"
FooterAggregateFormatString
=
"{0:0%}"
>
<
ItemStyle
HorizontalAlign
=
"Right"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
/>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
DataField
=
"On Time 90% Fill Rate"
HeaderText
=
"On Time 90% Fill Rate"
HeaderStyle-Width
=
"65px"
DataFormatString
=
"{0:#,##0;}"
Aggregate
=
"Sum"
>
<
ItemStyle
HorizontalAlign
=
"Right"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
/>
</
telerik:GridNumericColumn
>
<
telerik:GridNumericColumn
DataField
=
"On Time 90% Fill Rate Pct"
HeaderText
=
"On Time 90% Fill Rate Pct"
HeaderStyle-Width
=
"65px"
UniqueName
=
"OnTimeFillRatePct"
Aggregate
=
"Custom"
FooterAggregateFormatString
=
"{0:0%}"
>
<
ItemStyle
HorizontalAlign
=
"Right"
/>
<
FooterStyle
HorizontalAlign
=
"Right"
/>
</
telerik:GridNumericColumn
>
<
telerik:GridBoundColumn
DataField
=
"Purchaser"
HeaderText
=
"Purchaser"
HeaderStyle-Width
=
"100px"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Responsibility Center"
HeaderText
=
"Responsibility Center"
HeaderStyle-Width
=
"100px"
></
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>