zoukankan      html  css  js  c++  java
  • 如何访问HeaderTemplate中的控件 dodo

    在DataGrid的ItemCreated事件中   
       if    (e.Item.ItemType==ListItemType.Header)   
       {   
       ((LinkButton)e.Item.Cells[i].Controls[1]).Text="haha";   
       }   
      
       
       1.datagrid.Controls(0)    是{System.Web.UI.WebControls.DataGridTable}   
       2.datagrid.Controls(0).Controls(i)    是第i行   
           相当于ItemCreated、ItemCommand事件中的e.Item   
       3.datagrid.Controls(0).Controls(i).Controls(j)    是第i行,第j+1列(0行一般是表头)   
           相当于ItemCreated、ItemCommand事件中的e.Item.cells(j)   
       4.datagrid.Controls(0).Controls(i).Controls(j).Controls(k)    是第i行,第j+1列,第k+1个控件     
           相当于ItemCreated、ItemCommand事件中的e.Item.Cells(j).Controls(k)   
       5.或   
           datagrid.Controls(0).Controls(i).Controls(j).FindControls("cid")   
           相当于ItemCreated、ItemCommand事件中的e.Item.Cells(j).FindControls("cid")   
  • 相关阅读:
    二叉树的四种遍历方法笔记
    SpringBoot简单连接数据库以及查询数据
    在Mac下配置Maven环境
    二叉树的存储结构
    二叉树区分左右
    JDBC编程流程以及详细代码
    树的存储结构
    Java基础总结
    Linux命令简写和全称
    spring-security使用
  • 原文地址:https://www.cnblogs.com/zgqys1980/p/1087261.html
Copyright © 2011-2022 走看看