By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,465 Members | 1,435 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,465 IT Pros & Developers. It's quick & easy.

Datagrid Custom Event Question

P: n/a

I have a Windows Forms datagrid, which is populated with data from a
SQL Server database. On that grid, I have both an EDIT button and a
DEL button. I used code to wire up a custom event handler for the
grid, such that it calls a method (m_HandleGridDelButton) in the class
to process a delete. My problem has been that the event handler fires
off more than once (I click the DEL button on one row, and several rows
are deleted). The above handling method is being called multiple times
for one single button click. Any ideas?

1 Generate custom grid column for button
2 Wire up mouse handler

this.grdLabRedirectionRules.MouseUp += new
this.grdLabRedirectionRules.MousedDown += new

The HandleMouseDown method of the custom button class is getting called
multiple times for one mouse click. Is this mouse click bounce or
something? Why is the grid generating multiple event calls for one
click? I'm guessing that it's something simple.

Thanks for your help!

Jan 25 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.