如何在ajax updatepanel触发器中处理gridview事件 [英] How to handle gridview events in ajax updatepanel trigger

查看:94
本文介绍了如何在ajax updatepanel触发器中处理gridview事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

告诉我如何处理gridview事件,例如ajax updatepanel触发器中的Row_Editing,Row_Deleting。



我的代码是



< asp:ScriptManager ID =ScriptManager1runat =server/>



< ; asp:UpdatePanel ID =UpdatePanel1runat =serverUpdateMode =ConditionalChildrenAsTriggers =true>

< contenttemplate>



这里是我的gridview



< triggers> < asp:AsyncPostBackTrigger ControlID =gvEventName =RowEditing/>



但是当我点击gridview中的编辑按钮时,此事件无法处理。



所以请给我解决方案

Hello,
Tell me how to handle gridview events such as Row_Editing,Row_Deleting in ajax updatepanel trigger.

My code is

<asp:ScriptManager ID="ScriptManager1" runat="server"/>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<contenttemplate>

here is my gridview

<triggers> <asp:AsyncPostBackTrigger ControlID="gv" EventName="RowEditing" />

but when I clicked on edit button which is in gridview this event does not handle .

So please give me solution

推荐答案

请试试这个





你必须编辑按钮id放到控制ID



例如control id =编辑







pls try to this


you have to edit button id put to the control id

for example control id="edit"



<Triggers>
          <asp:PostBackTrigger ControlID="btnSubmit" />
          <asp:PostBackTrigger ControlID="btnUpdate" />
          </Triggers>




这篇关于如何在ajax updatepanel触发器中处理gridview事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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