I added one more column of balance and used JavaScript to subtract I_Amt to C_AMT and display in balance column, but not getting done mean not getting minus
Refer below link
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="Scripts/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
<script type="text/javascript">
$(function () {
$(".js-example-placeholder-single").select2({
placeholder: "Select",
allowClear: true
});
});
function Calulate(txt) {
//alert(txt.value);
var tr = txt.parentNode.parentNode;
var textbox = tr.getElementsByTagName("input");
if (isNaN(textbox[1].value)) {
alert("Enter integer value");
}
else {
textbox[4].value = parseInt(textbox[1].value) - parseInt(textbox[3].value);
}
}
</script>
<br />
<table class="nav-justified">
<tr>
<td style="width: 233px"> </td>
<td class="text-center" style="width: 256px; font-weight: bold; font-size: x-large; text-decoration: underline;">Payment Receive<br />
Form</td>
<td class="text-right" style="width: 150px">Date:</td>
<td>
<asp:TextBox ID="txtentdate" ReadOnly="true" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 233px"> </td>
<td class="text-center" style="width: 256px"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td class="text-right" style="width: 233px"><strong>Select Customer </strong>:</td>
<td style="width: 256px">
<asp:DropDownList ID="ddlcus" AutoPostBack="true" CssClass="form-control js-example-placeholder-single" ToolTip="Select " Height="85px" Width="200px" runat="server" OnSelectedIndexChanged="ddlcus_SelectedIndexChanged">
</asp:DropDownList>
</td>
<td style="width: 150px"> </td>
<td>
</td>
</tr>
<tr>
<td class="text-right" style="width: 233px"> </td>
<td style="width: 256px">
</td>
<td style="width: 150px"> </td>
<td>
</td>
</tr>
<tr>
<td style="width: 233px" class="text-right"><strong>Payment Mode:</strong></td>
<td style="width: 256px">
<asp:DropDownList ID="ddlpmode" AutoPostBack="true" CssClass="form-control js-example-placeholder-single" ToolTip="Select " Height="85px" Width="200px" runat="server" OnSelectedIndexChanged="ddlpmode_SelectedIndexChanged">
<asp:ListItem Text="Select" Value="0"></asp:ListItem>
<asp:ListItem Text="Bank" Value="1"></asp:ListItem>
<asp:ListItem Text="Cash" Value="2"></asp:ListItem>
</asp:DropDownList>
</td>
<td style="width: 150px" class="text-right">
<asp:Label ID="lbBank" runat="server" Text="Bank"></asp:Label>
:</td>
<td>
<asp:DropDownList ID="ddlbanks" CssClass="form-control js-example-placeholder-single" ToolTip="Select " Height="85px" Width="200px" runat="server" >
</asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 233px"> </td>
<td style="width: 256px"> </td>
<td style="width: 150px"> </td>
<td> </td>
</tr>
<tr>
<td style="width: 233px"> </td>
<td colspan="3">
<div>
<asp:TextBox ID="chequno" PlaceHolder="Input Cheque No" runat="server"></asp:TextBox>
<asp:TextBox ID="chqamount" PlaceHolder="Input Amount" runat="server"></asp:TextBox>
<asp:Button ID="btn_Adj" runat="server" OnClick="btn_Adj_Click" Text="Adjust_Amount" />
<asp:TextBox ID="chqamount0" Visible="false" runat="server" Height="16px" Width="16px"></asp:TextBox>
<br />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" Enabled="false" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:TemplateField HeaderText=" ID">
<ItemTemplate>
<asp:Label ID="I_ID" runat="server" Text='<%#Bind("I_ID")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Invocie_Amount">
<ItemTemplate>
<asp:Label ID="I_Amt" runat="server" Text='<%#Bind("I_Amt")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText=" Cheque_NO">
<ItemTemplate>
<asp:TextBox ID="C_NO" runat="server" ReadOnly="true" Text="0"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Received_Amount">
<ItemTemplate>
<asp:TextBox ID="C_Amt" runat="server" ReadOnly="false" onchange="Calulate(this)" Text="0"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Balance">
<ItemTemplate>
<asp:TextBox ID="I_Balance" runat="server" ReadOnly="true" Text="0"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status">
<ItemTemplate>
<asp:DropDownList ID="ddlStatus" runat="server">
<asp:ListItem Text="Pending" Value="1"></asp:ListItem>
<asp:ListItem Text="Received" Value="2"></asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</td>
</tr>
<tr>
<td style="width: 233px"> </td>
<td style="width: 256px"> </td>
<td style="width: 150px"> </td>
<td> </td>
</tr>
<tr>
<td style="width: 233px"> </td>
<td style="width: 256px">
<asp:Button ID="btn_SV" runat="server" Text="Save" OnClick="btn_SV_Click" />
</td>
<td style="width: 150px"> </td>
<td> </td>
</tr>
<tr>
<td style="width: 233px"> </td>
<td style="width: 256px"> </td>
<td style="width: 150px"> </td>
<td> </td>
</tr>
<tr>
<td style="width: 233px"> </td>
<td style="width: 256px"> </td>
<td style="width: 150px"> </td>
<td> </td>
</tr>
<tr>
<td style="width: 233px"> </td>
<td style="width: 256px"> </td>
<td style="width: 150px"> </td>
<td> </td>
</tr>
</table>