I have a customized BPM form that checks some logic on certain fields when OK is clicked and throws an error if data is missing. The reason I have a custom drop down is because within the BPM Data Form Designer, I cannot add a connection to a BAQ or Adapter to get the data; I would have to manually add values. So, I’m trying to require the input of that drop down and it works, except it shows the error message and then closes the BPM form. How can I prevent form from closing?
The click event has EventArgs instead of CancelEventArgs, so I cannot do args.Cancel = true (unless I’m missing something).
catch(Exception e)
{
if( e.ToString().Contains("Product") )
MessageBox.Show("Product Group is Required", "Product Group Required", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show(e.ToString());
edvBPM.dataView[edvBPM.Row].BeginEdit();
edvBPM.dataView[edvBPM.Row]["ButtonValue"]=1337;
edvBPM.dataView[edvBPM.Row].EndEdit();
}