Hi i want to find the header value and first value of each row in a gridview using jquery
here is my code
$("#GridView1 tr td").filter(":not(td:first-child)").each(function () {
var cellText = $(this).text();
if ($.trim(cellText) == '') {
$(this).css('background-color', 'LightGreen');
$(this).append("<a href='booking.aspx' title ='click to book'>available</a>");
}
else {
$(this).css('background-color', 'red');
}
});
here iam filtering rows except header value and first child of each row
my requirement is i want to add headervalue and first value of each row(td:first-child) in to anchor tag
like this
$(this).append("<a id="headervalue-firstchild" href='booking.aspx' title ='click to book'>available</a>");
how to solve this
Regards
Baiju