this is my 2nd request.
Before exporting radgrid to excel I am creating a header rowin the following event:
protected
void CfnReportGrid_ExcelMLExportRowCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowCreatedArgs e)
{
if (e.RowType == Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLRowType.HeaderRow)
{
Telerik.Web.UI.GridExcelBuilder.
RowElement row = new Telerik.Web.UI.GridExcelBuilder.RowElement();
Telerik.Web.UI.GridExcelBuilder.
CellElement cell = new Telerik.Web.UI.GridExcelBuilder.CellElement();
cell.Data.DataItem =
"NYC DEPARTMENT OF EDUCATION";
cell.StyleValue =
"MyHeaderStyle";
cell.MergeAcross = e.Row.Cells.Count - 1;
row.Cells.Add(cell);
e.Worksheet.Table.Rows.Insert(0, row);
}
And then in another event I do styling this header:
protected
void CfnReportGrid_ExcelMLExportStylesCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExportExcelMLStyleCreatedArgs e)
{
Telerik.Web.UI.GridExcelBuilder.StyleElement myStyleH = new lerik.Web.UI.GridExcelBuilder.StyleElement"MyHeaderStyle");
myStyleH.FontStyle.Size = 25;
myStyleH.FontStyle.Bold =
true;
System.Drawing.
Color col = System.Drawing.ColorTranslator.FromHtml("#2C78FF");
myStyleH.FontStyle.Color = col;
myStyleH.AlignmentElement.HorizontalAlignment = Telerik.Web.UI.GridExcelBuilder.HorizontalAlignmentType.Center;
e.Styles.Add(myStyleH);
}
My question is:I need colored each letter of "NYC" in different color:
letter "N" in green color
letter "Y" in orange color
letter "C" in blue color
And it should by on the same line.
Thanks so much for your help.