访问gridview外部的gridview控件 [英] access gridview controls outside the gridview

查看:72
本文介绍了访问gridview外部的gridview控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在gridview项目模板中有一个链接按钮。

如何在外面访问该链接按钮ID gridview。



提前致谢

Venkatesh ..

Hi all,

I have a link button in gridview item template.
How can i access that link button id outside the gridview.

Thanks in advance
Venkatesh..

推荐答案

最佳选择是通过GridView循环 [ ^ ]:

The best option is Looping Through GridView[^]:
foreach (GridViewRow gvrow in GridView1.Rows) 
{ 
    LinkButton LinkButton1 = (LinkButton)gvrow.FindControl("LinkButton1"); 
    if (LinkButton1 != null) 
    { 
        //Do your operations here. 
    } 
}









--Amit





--Amit


这篇关于访问gridview外部的gridview控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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