Urgent help needed with Checkboxes

  • Thread starter Thread starter Joe Kasta
  • Start date Start date
J

Joe Kasta

Here's a tricky question..:)

I have a a function in a webform that will draw a checkbox in a given area
(note, this is an override of a PaintForeground function, not a drop / drag
of a checkbox from the toolbar).
System.Windows.Forms.ControlPaint.DrawCheckBox(e.Graphics, tempRectangle,
Windows.Forms.ButtonState.Checked)

It's draw in a cell within a grid. I use an AddHandler function to call a
function (Call it Function X) when the cell is clicked. I have also
overridden the onclick function of the cell to redraw the checkbox as
clicked or unclicked, depending on what the previous value was.

The problem is that Function X is called twice each time I click the cell. I
have *throughly* reviewed the code to make sure that I haven't added two
handlers. I have not been.Despite this, a stack trace does seem to indicate
there are two handlers, though my assembly is not so good.

When I draw a checkbox, does it automaticially add a handler? And does that
handler "bubble" up to the cell? If so, can this be prevented? Thank you in
advance.

-J
 
I had the same problem with another issue, not checkboxes, but I set a flag
(not the best...) that said it was already clicked. And then when it
finished processing, it reset the flag.

May or may not help.. I dunno.

-CJ
 
-----Original Message-----
I had the same problem with another issue, not checkboxes, but I set a flag
(not the best...) that said it was already clicked. And then when it
finished processing, it reset the flag.

May or may not help.. I dunno.

-CJ
function, not a drop /
drag time I click the cell.
I does seem to
indicate handler? And does
that prevented? Thank you
in


.
 
Hi Herfried,

Isn't it annoying when the response is in the message title and the body is
full of garbage!

Regards,
Fergus
 
Back
Top