I have a gridview having text boxes in template fields and buttons in footer, on footer button click i want to calculate the total of template column’s having textboxes but i am not able to get textboxe’s value.i am using following code in my aspx page
function ValidateTotalPercentage(CellNo)
{
var ages = 0;
var weights = 0;
var benchpresses = 0;
//reference the rows you want to add
//this will not include the header row
var rows = $("#<%=grdMaterialPercentage.ClientID%> tr:gt(0)");
rows.children("td:nth-child(" + CellNo + ")").each(function () {
//each time we add the cell to the total
var str= $(this).html();
alert(str.toString().indexOf("value"));
});
alert(ages);
return false;
}
Thanks
Try this