This question is locked. New answers and comments are not allowed.
Hi,
I have a RadMenuItem that when clicked displays a SaveFileDialog in order for the user to export and save the contents of a RadGridView. If the event handler is called due to the user hitting the Enter key then an AccessViolationException memory exception is thrown attempting to read the DialogResult property:
The if (saveFileDialog.ShowDialog() == true) produces the following exception:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Any ideas why this might be occuring?
Regards,
Chris
I have a RadMenuItem that when clicked displays a SaveFileDialog in order for the user to export and save the contents of a RadGridView. If the event handler is called due to the user hitting the Enter key then an AccessViolationException memory exception is thrown attempting to read the DialogResult property:
var saveFileDialog = new SaveFileDialog { DefaultExt = extension, Filter = string.Format("{0} files (*.{1})|*.{1}|All files (*.*)|*.*", format, extension), FilterIndex = 1 }; if (saveFileDialog.ShowDialog() == true) { using (Stream fileStream = saveFileDialog.OpenFile()) { this.GridView.Export(fileStream, new GridViewExportOptions { Format = format1, ShowColumnFooters = true, ShowColumnHeaders = true, ShowGroupFooters = false }); } }The if (saveFileDialog.ShowDialog() == true) produces the following exception:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Any ideas why this might be occuring?
Regards,
Chris