Example #1
0
        protected void Grid_ToolbarItemClick(object source, ASPxGridToolbarItemClickEventArgs e)
        {
            ASPxGridView grid = (ASPxGridView)source;

            switch (e.Item.Name)
            {
            case "CustomExportToXLS":
                grid.ExportXlsToResponse(new DevExpress.XtraPrinting.XlsExportOptionsEx {
                    ExportType = ExportType.WYSIWYG
                });
                break;

            case "CustomExportToXLSX":
                grid.ExportXlsxToResponse(new DevExpress.XtraPrinting.XlsxExportOptionsEx {
                    ExportType = ExportType.WYSIWYG
                });
                break;

            default:
                break;
            }
        }