如何查找放置在C#.NET的选项卡容器中的gridview内的控件 [英] How to find a control placed inside a gridview which is in a tab container in C#.NET

查看:87
本文介绍了如何查找放置在C#.NET的选项卡容器中的gridview内的控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何查找位于选项卡容器中的gridview控件内的图像按钮.我需要在屏幕上的gridview中显示图像.

请尽快将上述代码发送给我.

谢谢
Ancie Varghese

How to find an image button placed inside a gridview control which is in a tab container.I need to display images on the screen in a gridview.

kindly send me the code for the above as soon as possible.

Thank you
Ancie Varghese

推荐答案

hi,

试试这个,



try this,

GridView grd  = (GridView)tabContainer1.SelectedTab.FindControl("GRidView1");
ImageButton imgBtn = (ImageButton)grd.Items[0].FindControl("ImageBtnID");

//This will find the image button contain in first row of the grid view. similarly you can find other controls

//your code goes here


希望它能起作用.


Hope it works.


这篇关于如何查找放置在C#.NET的选项卡容器中的gridview内的控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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