I need to know how to set the background color of a group header cell to something other than white.
here is the back end code that I have tried.
Attempt 1
Attempt 2... which did not work either. I have Group: as my header text... I guess I was hoping that it would grab that info...
I am exporting using ExcelHTML.
Thanks,
Dustin
here is the back end code that I have tried.
Attempt 1
protected
void
RadGrid1_ExcelExportCellFormatting(
object
source, ExcelExportCellFormattingEventArgs e)
{
GridDataItem item = e.Cell.Parent
as
GridDataItem;
if
(item.ItemType == GridItemType.GroupHeader)
item.Style[
"background-color"
] =
"#FFFF00"
;
}
Attempt 2... which did not work either. I have Group: as my header text... I guess I was hoping that it would grab that info...
protected
void
RadGrid1_ExcelExportCellFormatting(
object
source, ExcelExportCellFormattingEventArgs e)
{
GridDataItem item = e.Cell.Parent
as
GridDataItem;
if
(e.Cell.Text.Contains(
"Group:"
))
item.Style[
"background-color"
] =
"#FFFF00"
;
}
I am exporting using ExcelHTML.
Thanks,
Dustin