I'm using worksheet protection IWorksheet.ProtectContents. If i try to change something there is message: "Locked cells cannot be modified when protection is enabled". So is there a way to change text and title of this message or though hide it?
问问题
488 次
1 回答
2
您可以处理 WorkbookView。ShowError (...) 事件,这将使您有机会防止某些错误消息弹出或提供您自己的自定义消息。例子:
private void workbookView_ShowError(object sender, SpreadsheetGear.Windows.Controls.ShowErrorEventArgs e)
{
if (e.Message == "Locked cells cannot be modified when protection is enabled.")
{
MessageBox.Show("My custom message");
e.Handled = true;
}
}
于 2013-10-03T14:54:25.733 回答