my gridview got few column.Column 1 is ID which is a linkbutton field , column 2 is CustName which also is a linkbutton field, column 3 is address which is a normal cell text .Here i got a question. How can i get the column 2 value when i click the ID button by Jquery?
Here my coding
$("a.ID").click(function (e) {
var row = $(this).parents("tr:first");
var Desc= row.children("td:eq(2)").text();
var test = row.children("td:eq(1) a").text();???Here error
alert(test);
});
I am able to get the colum 3 value when click the particular selected row.
I don't know outright why that doesn't work, but try separating it:
row.children("td:eq(1)").find('a').text();