Making an entire row clickable in a gridview

前端 未结 6 1851
北恋
北恋 2020-12-03 05:44

I have a gridview and I need to make an event fire when a row is clicked.

Is there an existing GridView event I need to bind to to make this happen?

6条回答
  •  醉酒成梦
    2020-12-03 06:16

    Some javascript programming will be required in order to make this happen.

    Basically you are going to have to handle the click event for the row(is some browsers the row does not have a click event so you might have to handle the click event of the tds... time to invest in an ajax framework!)

    You will then from javascript have to fire a postback with the row index as a parameter. See encosia(a great site for ASP.Net - ajax implementations) on how to do that. Here is a link to an article along those lines

提交回复
热议问题