My current version is 2024.1.312.40
I tried to load a layout (xml file) saved in a previous version RadGridView and get an error that I cannot intercept. In which way I can either catch this exception or disable their occurrence for the user?
The exception occurs in the method: rdgvMain.LoadLayout(reader) and try is not working;
strLayout, reader, stream are not empty
try
{
using (var stream = new StringReader(strLayout))
{
var reader = XmlReader.Create(stream);
rdgvMain.LoadLayout();
stream.Close();
reader.Close();
}
}
catch (Exception ex)
{
AddInfo(ex.Message);
}
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.WinControls.UI.GridRowBehavior.OnMouseMove(MouseEventArgs e)
at Telerik.WinControls.UI.BaseGridBehavior.OnMouseMove(MouseEventArgs e)
at Telerik.WinControls.UI.RadGridView.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at Telerik.WinControls.UI.RadGridView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,