From: John on 30 Sep 2005 19:08 Yes. Re-read your post and I think I am OK now. Thanks Regards "Ken Tucker [MVP]" <vb2ae(a)bellsouth.net> wrote in message news:ea48bFhxFHA.3892(a)TK2MSFTNGP12.phx.gbl... > John, > > Are you binding to a dataset? > > Ken > ---------------- > "John" <John(a)nospam.infovis.co.uk> wrote in message > news:e59Sn3exFHA.3720(a)TK2MSFTNGP11.phx.gbl... >> Doesn't seem to work for me. The msgbox never appears. I am using the >> BindingNavigator. Do I need to change anything at that end? >> >> Regards >> >> "Ken Tucker [MVP]" <vb2ae(a)bellsouth.net> wrote in message >> news:e5a0kxaxFHA.720(a)TK2MSFTNGP15.phx.gbl... >>> Hi, >>> >>> I wish the bindingnavigatordelete_click event allowed you to >>> cancel the delete of the row. If you are bound to a dataset you can add >>> a handler to the rowdeleted event and undo the delete. Not the best >>> solution but it works >>> >>> AddHandler AdventureWorksDataSet.Tables(0).RowDeleted, AddressOf >>> Row_Deleting >>> >>> >>> Private Shared Sub Row_Deleting(ByVal sender As Object, _ >>> ByVal e As DataRowChangeEventArgs) >>> If MessageBox.Show("Are you sure?", "", MessageBoxButtons.YesNo) >>> = Windows.Forms.DialogResult.No Then >>> e.Row.RejectChanges() >>> End If >>> End Sub >>> >>> Ken >>> ---------------- >>> "John" <John(a)nospam.infovis.co.uk> wrote in message >>> news:%235Km6%23WxFHA.3756(a)tk2msftngp13.phx.gbl... >>>> Hi >>>> >>>> When I press the delete button on the BindingNavigator it deletes the >>>> record without any warning. How can I add a warning dialog when the >>>> delete button on the BindingNavigator is pressed and before the record >>>> is actually deleted? >>>> >>>> Thanks >>>> >>>> Regards >>>> >>>> >>> >>> >> >> > > |