asif ali

asif ali

  • NA
  • 1
  • 0

How to cancel BindingNavigator event.

Oct 24 2007 1:15 AM

Hi

I am working on a desktop application using C# n .NET 2.0. I have a BindingNavigator, BindingSource and a DataSet on a screen. Their properties are set as follows.

BindingNavigator1.BindingSource = BindingSource1;

BindingSource1.DataSource = DataSet1;

BindingSource1.DataMember1 = DataSet1.Table1;

Now the AddNewItem event of BindingNavigator looks something like and here is what I want to do.

void BindingNavigator1_AddNewItem_Click( sender s, EventArgs e )

{

  //    if( MyCond )

    //     Cancel this event;

     //else

       //  Go Ahead;

}

I think there should have been e.cancle(); to cancel this event but it is not there. So I cannot find out how to cancel this event. Can anybody help me out?