Added Error Handler for corrupted table data.

This commit is contained in:
Rich
2014-10-22 20:25:31 +00:00
parent 6098140d26
commit 505bfa467d
2 changed files with 23 additions and 8 deletions

View File

@@ -760,8 +760,15 @@ namespace Volian.Controls.Library
MyFlexGrid.Focus();
if (!MyFlexGrid.IsRoTable) // Table ROs are none editable - don't select a table cell
{
MyFlexGrid.Select(0, 0);
MyFlexGrid.FirstEntry = true; // to fix a problem with initial mouse click into table
try
{
MyFlexGrid.Select(0, 0);
MyFlexGrid.FirstEntry = true; // to fix a problem with initial mouse click into table
}
catch (Exception ex)
{
MessageBox.Show("The content of this table is corrupted. You will either need to restore a previous version or delete it.", "Table Corrupted", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
else