The phenomnenon you describe about buttoncode still executing also is true for ribbonmenu buttons and ribbonmenutabs. The hanging up problem I couldn't reproduce so I guess it has to do with the code of your executed buttons there.
For a possible workaround you could put a private variable into your form and in the cellvalidation code set it to true if an error occurs and false if no error occurs (and naturally set it fo false in the form initialization code).
Then within the buttons code you test for the variables value if its true no code is executed.
Thus if you have a ribbonform (or any other form) as class:
public partial class MF : RadRibbonForm
{
private bool _hasValidationError;
public MF()
{
...//Normal construction handler code
_hasValidationError = false;
}
void MF_CellValidating(objec sender, CellValidatingEventArgs e)
{
.....//Do validation and set e.Cancel true if the validation fails.
if (e.Cancel)
{
hasValidationError = true;
}
else
{
hasValidationError = false;
}
}
private void MyButton_Click(object sender, EventArgs e)
{
if (_hasValidationError)
{
// Before return you could put in a messagebox that there are cell errors that need to be looked at first
return;
}
else
{
.......//Button code execution occurs here
}
}
With this code you can make sure that the code of the buttons you don't want to be executed won't get executed on an Cell validation error.
The Code is in C# but should work similar for VB winforms.