Click here to Skip to main content
15,906,097 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm trying to attach a method to the delete button on the Binding Navigator to perform an action when the delete button is pressed based on the data in the selected row(s) being deleted. When the method gets control, Selected.Rows.Count is always zero. I suspect the rows are being removed before the CLICK method gets control.

How do I disable this delete from happening so that I can programmatically call the delete function?

Thank you,
Glenn
Posted
Comments
Krunal Rohit 7-Mar-14 22:32pm    
In Asp or Forms ?

-KR
gmhanna 7-Mar-14 22:34pm    
In Windows Forms.
Krunal Rohit 7-Mar-14 22:35pm    
So you want to delete the row on button click ?

-KR
gmhanna 7-Mar-14 22:46pm    
The DataGridView is bound to a SQL table. I dragged the Data Source onto the Windows Form, so the DELETE button is pre-wired to delete the entry in the table. I would like to remove that pre-wired delete, so I can capture information from the row being deleted, then I want to call the pre-wired delete method, or use my own.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900