how to find header value of gridview using jquery

Posted by Klbaiju under jQuery on 7/9/2013 | Points: 10 | Views : 1454 | Status : [Member] | Replies : 1
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


Posted by: aswinialuri-19361 on: 7/30/2013 [Member] Starter | Points: 25

HI ,
refer this link i hope it will help you

Mark as Answer if it helps you
Aswini Aluri

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response