private static void pdfExporter_HTMLCellFormatting(object sender, Telerik.WinControls.UI.Export.HTML.HTMLCellFormattingEventArgs e)
 {
     if (e.GridCellInfo.ColumnInfo is GridViewDateTimeColumn)
     {
         e.HTMLCellElement.Value = FormatDate(e.HTMLCellElement.Value);
     }
 }
 void htmlExporter_HTMLCellFormatting(object sender, Telerik.WinControls.UI.Export.HTML.HTMLCellFormattingEventArgs e)
 {
     if (e.GridCellInfo.ColumnInfo is GridViewDateTimeColumn)
     {
         e.HTMLCellElement.Value = BaseService.FormatDate(e.HTMLCellElement.Value);
     }
 }
Пример #3
0
 void exporter_HTMLCellFormatting(object sender,
                                  Telerik.WinControls.UI.Export.HTML.HTMLCellFormattingEventArgs e)
 {
     if (e.GridRowIndex > -1 &&
         e.GridColumnIndex == radGridView1.Columns["SalesLastYear"].Index)
     {
         int value = Convert.ToInt32(radGridView1.Rows[e.GridRowIndex].Cells
                                     [e.GridColumnIndex].Value);
         if (value > 1500000)
         {
             //cells with value over 1500000 will be yellow
             e.HTMLCellElement.Styles.Add("background-color", ColorTranslator.ToHtml(Color.Yellow));
         }
     }
 }