Invoking the click method of a button programmatically

前端 未结 2 1888
悲&欢浪女
悲&欢浪女 2021-01-21 22:32

Simple problem (I think): I want to be able to invoke a click method on a predefined object, specifically, the bindingNavigatorDeleteItem button on the standard c#

2条回答
  •  生来不讨喜
    2021-01-21 23:22

    Instead of intercepting the toolstrip button (and leaving other techniques open to the user, such as deleting a row within a DataGrid), use one of the events on your Data Source to cancel the delete if invalid.

提交回复
热议问题