Hello,
I would like to know if it is possible to use a ServerClick event on a
tablerow. I have a HTML table and I would like to handle an event on the
server when the user clicks on a row in the table.
I could use the GridView, but then I have to add a new Select column and
I don't want a new column for selecting a row. A user should be able to
click on any column in the row to fire the event on the server (not a
javascript function).
Greetings,
Chris
Eliyahu Goldin - 11 Feb 2008 14:52 GMT
Go ahead and add a Select column as the first column in the grid. Hide the
Select column with Visible=false. Handle RowDataBound event and run this
code for every data row:
e.Row.Attributes["onclick"] = this.GetPostBackEventReference
(e.Row.Cells[0].Controls[0]);

Signature
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
> Hello,
>
[quoted text clipped - 11 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***