TabControl中有个tp的页,tp中有个叫dg的DataGrid控件,怎么把它取出来?
解决方案 »
- winform中,如何强制删除被占用文件?
- string.Copy()
- EXTJS TREE 单击事件 救命!!!!!!!
- C# 做考勤系统 关于刷卡出发事件的问题!!!急!!在线等、!!!!
- .NET里边的一些概念疑惑
- C#中查询mdb是否有相同数据如果没有就插入数据库帮我分析哪错了?
- 求类型强制转换问题,怎样把一个String强制转换为MenuItem?
- 通过RichTextBox读取.txt文件时,出现乱码
- WebBrowser 怎么加载到TabPage中的
- 为什么我的机器装了Visual Studio .net之后,机器超级慢?如何让它快起来?
- 类的基础问题
- 怎样绑定DataList中的ItemTemplate中的HyperLink?
{
tabpage tap=TabContol.TabPages[intNum];
foreach control dd in tap.control
{
if(dd is DataGrid)
{
//处理
}}}
private bool _hasDataGridView; void tabControl_ControlAdded(object sender, ControlEventArgs e)
{
if (e.Control is TabPage) _hasTabPage = true;
} void tabPage_ControlAdded(object sender, ControlEventArgs e)
{
if (e.Control is DataGridView) _hasDataGridView = true;
} public bool HasTabPage
{
get { return _hasTabPage; }
set { _hasTabPage = value; }
} public bool HasDataGridView
{
get { return _hasDataGridView; }
set { _hasDataGridView = value; }
}