Example #1
0
        public static void ImportTo(DevExpress.XtraGrid.Views.Base.BaseView bv, DevExpress.XtraExport.IExportProvider provider)
        {
            Cursor currentCursor = Cursor.Current;

            Cursor.Current = Cursors.WaitCursor;

            DevExpress.XtraGrid.Export.BaseExportLink link = bv.CreateExportLink(provider);
            link.ExportTo(true);

            Cursor.Current = currentCursor;
        }
        private void ExportToEx(DevExpress.XtraExport.IExportProvider provider, DevExpress.XtraGrid.Views.Base.BaseView exportView)
        {
            Cursor currentCursor = Cursor.Current;

            Cursor.Current = Cursors.WaitCursor;
            DevExpress.XtraGrid.Export.BaseExportLink link = exportView.CreateExportLink(provider);
            if (link != null)
            {
                link.ExportCellsAsDisplayText = exportOption.Checked;
                link.ExportTo(true);
            }
            provider.Dispose();
            Cursor.Current = currentCursor;
        }