We help IT Professionals succeed at work.

Update GridView columns after changing column value

BrianM_AZ
BrianM_AZ asked
on
Hi Experts,
I'm trying to update other columns when a column (tbQty) is changed by the user. I cannot get the "ontextchanged="tbQty_TextChanged" to fire. What am I missing here?

Thanks for the help

<asp:GridView ID="gvTest" runat="server">
     <Columns>
         <asp:TemplateField>
             <ItemTemplate>
                 <asp:TextBox ID="tbQty" runat="server" OnTextChanged="tbQty_TextChanged"></asp:TextBox>
             </ItemTemplate>
         </asp:TemplateField>
         <asp:BoundField DataField="Price" HeaderText="Price" ReadOnly="true" DataFormatString="{0:c}" />
         <asp:BoundField DataField="Total" HeaderText="Total" ReadOnly="true" DataFormatString="{0:c}" />
      </Columns> 
</asp:GridView>

Open in new window

Comment
Watch Question

Hi.., Add autopostback property  as true to the text box.