Hi akhter,
Use below code.
<script type="text/javascript">
$(function () {
$("[id*=orderqty]").val("0");
$("body").on("change keyup", "[id*=orderqty]", function () {
//Check whether Quantity value is valid number.
var quantity = $.trim($(this).val());
if (isNaN(quantity)) {
quantity = 0;
}
//Update the Quantity TextBox.
$(this).val(quantity);
var row = $(this).closest("tr");
//Check whether Rate value is valid number.
var rate = $("[id*=rate]", row).html();
if (isNaN(rate)) {
rate = 0;
}
$("[id*=rate]", row).html(rate);
//Calculate and update Row Total.
$("[id*=lbtotal]", row).html(parseFloat(rate) * parseFloat(quantity));
//Calculate and update Grand Total.
var grandTotal = 0;
$("[id*=lbtotal]").each(function () {
grandTotal = grandTotal + parseFloat($(this).html());
});
$("[id*=lblGrandTotal]").html(grandTotal.toString());
});
});
</script>