You get the value in both the click event as like below.
<script type="text/javascript">
$("[id*=chkHeader]").live("click", function () {
var chkHeader = $(this);
var grid = $(this).closest("table");
$("input[type=checkbox]", grid).each(function () {
if ($(this).closest("tr").find("[id*=hdID]").length > 0) {
/*Code here to get store the value i just alert it */
alert($("td", $(this).closest("tr")).find("[id*=hdID]").val());
}
if (chkHeader.is(":checked")) {
$(this).attr("checked", "checked");
$("td", $(this).closest("tr")).addClass("selected");
} else {
$(this).removeAttr("checked");
$("td", $(this).closest("tr")).removeClass("selected");
}
});
});
$("[id*=chkRow]").live("click", function () {
var grid = $(this).closest("table");
var chkHeader = $("[id*=chkHeader]", grid);
/*Code here to get store the value i just alert it */
alert($(this).closest("tr").find("[id*=hdID]").val());
if (!$(this).is(":checked")) {
$("td", $(this).closest("tr")).removeClass("selected");
chkHeader.removeAttr("checked");
} else {
$("td", $(this).closest("tr")).addClass("selected");
if ($("[id*=chkRow]", grid).length == $("[id*=chkRow]:checked", grid).length) {
chkHeader.attr("checked", "checked");
}
}
});
</script>