Process DialogResult.Ok button click

  • Thread starter Thread starter Roman Muntyanu
  • Start date Start date
R

Roman Muntyanu

Hi all

I have modal dialog that has DialogResult=Ok button
I need to check some data in dialog when I click Ok before returning
to calling form.

Any tips would be appreciated

Thanks,
Roman
 
Set the dialog resul of the button to be none.

in the click event

{
//process here

if(something fails)
this.DialogResult = None;
else
this.DialogResult = OK;

}
 
Back
Top