hi, i'm trying to do something in a begining easy but not so in real. I have a grid view with a new row to insert new records through textboxes, among them txtUnits, txtPrice and txtTotal.
i have problems to access textbox content in the gridview. How ca i refeer to them to get Total value in txtTotal.
Something easy like txtTotal= txtUnits * txtPrice
this is part of the code of my Grid:
<asp:TemplateField ItemStyle-Width = "150px" HeaderText = "Unidades">
<ItemTemplate>
<asp:Label ID="lblUnidades" runat="server"
Text='<%# Eval("Cantidad")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtUnidades" runat="server"
Text='<%# Eval("txtUnidades")%>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtUnidades" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "150px" HeaderText = "Precio">
<ItemTemplate>
<asp:Label ID="lblPrecio" runat="server"
Text='<%# Eval("precio")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtPrecio" runat="server"
Text='<%# Eval("txtPrecio")%>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtPrecio" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "150px" HeaderText = "Importe">
<ItemTemplate>
<asp:Label ID="lblTotal" runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Should it be possible to calculate Total onBlur event or similar?
Many thanks in advance for suggestions