locked
How do I calculate in grideview RRS feed

  • Question

  • I am trying to make an order form in asp.net. when a code is selected from drop down list in grid view then it automatically show Name and Price in label. But when a value is given in the Quantity text box it does not work. All data come from a different table. My grid view is look like...
    <asp:GridView ID="GridView1" runat="server"><columns style="color:#111111;font-family:'Segoe UI', Arial, sans-serif;font-size:14px;line-height:normal;">
    <asp:TemplateField HeaderText="Code" ><itemtemplate>
    <asp:DropDownList ID="ddlCode" runat="server"></itemtemplate>
    <asp:TemplateField HeaderText="Name" ><itemtemplate>
    <asp:Label ID="lblName" runat="server" /> </itemtemplate>
    <asp:TemplateField HeaderText="Price" ><itemtemplate>
    <asp:Label ID="lblPrice" runat="server" /> </itemtemplate>
    <asp:TemplateField HeaderText="Quantity" ><itemtemplate>
    <asp:TextBox ID="txtQuantity" runat="server">
    </itemtemplate></columns>
    How do I calculate Total and all rows Total ?
    Tuesday, November 10, 2015 7:58 PM