如何在gridview中使用文本更改文本框时使用javascript调用gridview的更新命令 [英] How do I call update command of gridview using javascript on text change of textbox in gridview

查看:128
本文介绍了如何在gridview中使用文本更改文本框时使用javascript调用gridview的更新命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用JavaScript或jquery在我的网格视图中触发更新命令。

下面是我在aspx中的网格视图代码

I want to fire update command in my grid-view using JavaScript or jquery.
Below is my code of grid-view in aspx

<asp:TemplateField HeaderText="Quantity" ItemStyle-Width="12%">
   <ItemTemplate>
     
  <asp:TextBox ID="TxtQty" runat="server" Text='<%#  Eval("p_quantity") %>' Width="39px" ></asp:TextBox>
   <asp:LinkButton ID="LnkView" runat="server" CommandName="Update" CssClass="new28">Update</asp:LinkButton>
           </ItemTemplate>
   <HeaderStyle HorizontalAlign="Left" />
      </asp:TemplateField>







以下是我的aspx.cs代码

i想要在TxtQty文本框的文本更改事件上调用此命令。

请帮我这个代码。




Below is my aspx.cs code
i want to call this command on text change event of TxtQty textbox.
Please help me in this code.

protected void GridView1_RowCommand1(object sender, GridViewCommandEventArgs e)
   {

if (e.CommandName == "Update")

推荐答案

检查一下..

使用jQuery Ajax更新GridView [ ^ ]
Check this one..
Update GridView using jQuery Ajax[^]


这篇关于如何在gridview中使用文本更改文本框时使用javascript调用gridview的更新命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆