Example #1
0
 public static void ExportToExcel(this RadGridView grid)
 {
     if (grid != null)
     {
         var gvBackground = new GridViewBackground();
         grid.ExportToExcel(gvBackground);
     }
 }
Example #2
0
 public static void ExportToExcel(this RadGridView grid, GridViewBackground gvBackground)
 {
     if (grid != null)
     {
         grid.Export(new ExportSettings
             {
                 GroupHeaderBackground = gvBackground.GroupHeaderBackground,
                 HeaderBackground = gvBackground.HeaderBackground,
                 RowBackground = gvBackground.RowBackground,
                 Format = (ExportFormat) Enum.Parse(typeof (ExportFormat), "Excel", false),
                 FileName = (string) grid.Tag
             });
     }
 }