I have generated a grid with this code:
newcontent += "<tr><td class=\"row\">" + a[i][0] + "</td><td>" + a[i][1] + "</td><td class=\"edit\"><img class=\"editrow\" name=\"" + a[i][2] + "\" src=\"../images/1321797859_edit.png\" /><img class=\"deleterow\" name=\"" + a[i][2] + "\" src=\"../images/1321787179_edit-delete.png\" />";
But when I want to get a row using this jQuery code:
$("img.editrow").click(function () {
alert($("td.row").text());
});
It will return all numbers of the row.
It could happen if you have other td.row in page
try like so