Sort of, yes. The problem is not adding the event to a table cell; it is
adding the event to a TableCell object instance. Since you're using a Table
WebControl, this event is not part of the object model. It *is* part of the
HTML Document Object Model supported by all (at least that I know of)
browsers.
So, what you need to do is to create a class that inherits TableCell, and
define a server click event for it. Then use that in your Table Control.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition
"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:O2**************@TK2MSFTNGP14.phx.gbl...
Hi,
Is it possible to add events, specifically a Click event, to a dynamically
created TableCell?
I have an <asp:Table...> control to which I'm dynamically adding TableRow
controls made up of TableCell controls - before you ask, the underlying
data is really not suitable for a DataGrid or Repeater...
Now, the client is asking for each dynamically added TableCell control to
respond to a server-side Click event - is this possible?
Mark