Completed
Last Updated: 12 Jul 2016 10:50 by Todor
Todor
Created on: 15 Jan 2016 07:52
Category: GridView
Type: Bug Report
0
FIX. RadGridView - RowValidating, CellValidating, SelectionChanged events are fired during export operation.
Selected rows/cells of RadGridView should not be exporting with their selected visual styles and this is why when the export starts all selected rows are cleared. At the end of export selection is restored. This is the reason Validating/ed and SelectionChanged events are fired when exporting with RadGridView exports.

Workaround:
Unsubscribe from these events before the export starts and subscribe to them again when export operation is completed.

this.radGridView1.RowValidating -= radGridView1_RowValidating;
this.radGridView1.SelectionChanged -= radGridView1_SelectionChanged;

// Export
ExportToExcelML excelMLExporter = new ExportToExcelML(this.radGridView1);
excelMLExporter.ExportVisualSettings = true;
excelMLExporter.RunExport(fileName);

this.radGridView1.RowValidating += radGridView1_RowValidating;
this.radGridView1.SelectionChanged += radGridView1_SelectionChanged; 
0 comments