I am exporting to Excel from radGrid and three different things I can not figure out. And I was hoping someone had some insight.
1. I want to style the headers of the columns, how do you do this?
2. I want to put an image in the top left of the Excel sheet, is this possible?
3. I want to show grid lines in the Excel instead of a white background. But only in Excel not the grid.
I'm able to get the normal data styled using this:
Thanks for any help, I'm pretty stuck.
1. I want to style the headers of the columns, how do you do this?
2. I want to put an image in the top left of the Excel sheet, is this possible?
3. I want to show grid lines in the Excel instead of a white background. But only in Excel not the grid.
I'm able to get the normal data styled using this:
protected
void
RadGrid1_ExportCellFormatting(
object
sender, ExportCellFormattingEventArgs e)
{
GridDataItem item1 = e.Cell.Parent
as
GridDataItem;
if
(e.FormattedColumn.UniqueName ==
"UniqueName"
)
{
TableCell cell = item[
"UniqueName"
];
cell.Style[
"background-color"
] =
"Red"
;
}
}
Thanks for any help, I'm pretty stuck.