从按钮单击调用Gridview事件 [英] Calling a Gridview Event from button Click

查看:61
本文介绍了从按钮单击调用Gridview事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个必须在其上调用Gridview事件的按钮,任何人都可以帮助我如何执行此功能.请注意,两种方法中的事件e都不相同,我需要GridViewUpdateEventArgs e

要更清楚

在这种情况下

 受保护的 无效 bUpdate_Click(对象发​​件人,EventArgs e)
       {
          // 我必须调用Gridview事件
       } 


 受保护的 无效 GridView1_RowUpdating(对象发​​件人,GridViewUpdateEventArgs e)
        {
            // 要调用的代码写在这里
        } 

解决方案

请参考以下链接
本文介绍了常见的GridView事件的处理:
GridView事件处理 [ Gridview用户控件中的事件处理 [ ^ ]

I have a button on which I have to Call an event of Gridview can anyone help how can I do this functionality. Take a note that the event e in both the method are different and I require GridViewUpdateEventArgs e

To be more clear

In this event

protected void bUpdate_Click(object sender, EventArgs e)
       {
          // I have to call Gridview Event
       }


protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            //Code to be called is written over here 
        }

解决方案

Please refer following link
This article describes the handling of the common GridView events:
GridView Event Handling[^]

Create a simple Gridview User Control and access its events in the parent page using Event Bubbling:
Event handling in a Gridview User Control[^]


这篇关于从按钮单击调用Gridview事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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