RobbSalzmann
3 years agoValued Contributor II
XFSqlTableEditorSaveDataTaskResult.CancelDefaultSave = True - has no effect?
After validating data in the XFSqlTableEditorSaveDataTaskInfo.EditedDataRows property collection, if a record fails validation, I set the XFSqlTableEditorSaveDataTaskResult.CancelDefaultSave property on saveDataTaskResult = True and return it. SQL Table Editor still saves the data. Same if I set it to False. Am I missing something?
Code:
For Each xfRow As XFEditedDataRow In saveDataTaskRows
isValid = validationHelper.IsValidDetails(xfRow)
If (Not isValid) Then
saveDataTaskResult.IsOK = False
saveDataTaskResult.Message = $"{saveDataTaskResult.Message}
{Environment.NewLine}
{validationHelper.validationMsg}"
saveDataTaskResult.ShowMessageBox = True
'SQL Table Editor still save the updates
'regardles whether this Is True Or False
saveDataTaskResult.CancelDefaultSave = True
Exit For
End If
Next
Return saveDataTaskResult