Click here to Skip to main content
15,884,425 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
XML
<asp:GridView ID="GvOrder" runat="server" AutoGenerateColumns="false">
        <Columns>

               <asp:TemplateField HeaderText = "Item">
                <ItemTemplate>
                    <asp:Label ID="lblItemName" runat="server" Text='<%# Eval("Product_Name")%>' ></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText = "Price">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Unit_Price")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText = "Quantity">
                <ItemTemplate>
                    <asp:TextBox ID="txtQuantity"  onkeyup="return calculate(this)" runat="server"></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText = "Total">
                <ItemTemplate>
                    <asp:Label ID="lblTotal" runat="server" Text="0"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>





item,Price,Total and grandtotal are label field and Quantity is in textbox
when we enter quantity then total and grand total will immediately calculate and display.
and when we erase quantity means no value then total and grand total will be immediately 0. how is it possible please help .
Posted
Comments
King Fisher 28-Nov-14 6:15am    
why don't you try with GridView RowDataBound ?

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900