I have a gridview that displays a summary for each product. When a user clicks on one row, I want him to see a jQuery dialog that displays details on the product whose row was clicked.
The web framework is ASP.NET, so below is how the <td> element looks like in the browser source
<td id="_ctl0_contentMain_gvListOfProducts__ctl13_cRef" align="left"
onclick="getProductInfo(10244);" style="width:10%;cursor:pointer;">Sneakers</td>
I have also a div that’s is supposed to be used for the dialog
<script type = "text/javascript">
function getProductInfo(id) {
//TO DO: Add jQuery functionality here to display dialog
}
</script>
Thanks for helping
only thing you need is to give a unique id and a class to each row, and then call one the jquery functions to load the product detail….
above code bind a click event for every row with “row” class and then as you can see, you can grab it is id and do what ever you want…