Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I created DataviewGrid manually. When fires CellContentClick event, it fires the event more than once. Does anyone have any idea what may trigger the problem and how to fix it?
Posted
Comments
Kevin Marois 20-Jan-16 15:28pm    
Check to see how many times you're subscribed to the CellContentClick event.

1 solution

You did not provide any code to help you to fix the bug, so I can only tell you what to do in such situations in general.

Probably you already can see that your event handler is called twice, even when the user makes only one click. This is good; probably it means that you used the debugger. There can be two general source for such doubling: your event handler is added twice (or more times) and the event is invoked twice. In all cases, here is what you can do:
Set a break point on the first statement of your event handler. Run the application and click on the cell. The execution will stop on your break point. Continue stopped execution; do it again and again until UI appears again without any more stopping at the break point. For all such stops, look at the debug window "Call stack". It will show you where the call comes from. Visiting different places on the call stack on each stop, you will be able to see the source of the problem.

—SA
 
Share this answer
 

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