Reputation: 273
I use link-button in grid-view for display popup appear by using this
$(function () {
$('[ID*=lbViewChart]').on('click', function () {
var row = $(this).closest('tr');
var Id = row.find('td')[0].firstChild.data;
var obj = {};
obj.ID = Id;
GetData(obj);
return false;
});
Now i want when user click on row then pop up appear for this i modify this code to this
UPDATED CODE
$(function () {
$('#tabledate tr').click(function () {
var row = $(this);
var Id = row.find('td')[0].firstChild.data;
var obj = {};
obj.ID = Id;
GetData(obj);
return false;
});
but when i click on row nothing happens any solution?
Upvotes: 1
Views: 63
Reputation: 26298
Remove
var row = $(this).closest('tr');
from your code you are already on tr
. Instead of this use:
var row = $(this).html();
Upvotes: 1