I am stuck and many times get stuck, when i try myself to multiply GridView column value to display in Third Column, it is not getting done
Please guide me, i tried below reference but not done
I want to multiply qty * Rate=Total
JS
<script type="text/javascript">
$(function () {
$("[id*=orderqty]").val("0");
});
$("body").on("change keyup", "[id*=orderqty]", function () {
//Check whether Quantity value is valid Float number.
var rate = parseFloat($.trim($(this).val()));
if (isNaN(rate)) {
rate = 0;
}
//Update the Quantity TextBox.
$(this).val(rate);
//Calculate and update Row Total.
var row = $(this).closest("tr");
$("[id*=lbtotal]", row).html(parseFloat($("td", row).eq(4).html()) * parseFloat($(this).val()));
//Calculate and update Grand Total.
var grandTotal = 0;
$("[id*=lbtotal]").each(function () {
grandTotal = grandTotal + parseFloat($(this).html());
});
$("[id*=lblGrandTotal]").html(grandTotal.toString());
});
</script>
<asp:GridView ID="GVSO" runat="server" AutoGenerateColumns="false" CssClass="mygrdContent" HeaderStyle-BackColor="#66ccff"
HeaderStyle-CssClass="header" HeaderStyle-ForeColor="White" PagerStyle-CssClass="pager"
RowStyle-CssClass="rows" style="font-size: small" Width="357px">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" onclick="Check_Click(this)" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Codeitem" Visible="true">
<ItemTemplate>
<asp:HiddenField ID="hfBID" runat="server" Value='<%#Eval("Codeitem")%>' />
<asp:Label ID="Codeitem" runat="server" Text='<%#Bind("Codeitem")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Description">
<ItemTemplate>
<asp:Label ID="Descriptionitem" Width="250px" runat="server" Text='<%#Bind("Descriptionitem")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Size">
<ItemTemplate>
<asp:Label ID="Size" runat="server" Text='<%#Bind("Size")%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField ItemStyle-Width="150px" DataField="rate" HeaderText="Rate" />
<asp:TemplateField HeaderText="QTY">
<ItemTemplate>
<asp:Textbox ID="orderqty" Width="50px" runat="server" Text='<%#Bind("orderqty")%>'></asp:Textbox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total">
<ItemTemplate>
<asp:label ID="lbtotal" Width="50px" runat="server" Text='<%#Eval("lbtotal")%>'></asp:label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle BackColor="#66CCFF" ForeColor="White" />
<SelectedRowStyle BackColor="Yellow" />
</asp:GridView>