Server Click in table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris Zopers

    Server Click in table

    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



    *** Sent via Developersdex http://www.developersdex.com ***
  • Eliyahu Goldin

    #2
    Re: Server Click in table

    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.Attribute s["onclick"] = this.GetPostBac kEventReference
    (e.Row.Cells[0].Controls[0]);

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]




    "Chris Zopers" <test123test12@ 12move.nlwrote in message
    news:OziULxLbIH A.208@TK2MSFTNG P02.phx.gbl...
    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
    >
    >
    >
    *** Sent via Developersdex http://www.developersdex.com ***

    Comment

    Working...