您的位置:程序门 -> .net技术 -> asp.net



datagrid页眉问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


datagrid页眉问题[已结贴,结贴人:xiluoshen2000]
发表于:2007-06-30 12:58:56 楼主
我在datagrid的事件dglist_itemdatabound()中,在
      if   e.item.itemtype   =   listitemtype.header   then
              在每个列头上加入控件,checkbox
      end   if

      在以后的程序中,我怎么样才能取到这些加入的控件?
发表于:2007-06-30 13:05:221楼 得分:0
环境是.net   2003
发表于:2007-06-30 13:20:122楼 得分:20
在类型中声明并实例化:
   
      private   listdictionary   headchecks=new   listdictionary();

然后:

      if   e.item.itemtype   =   listitemtype.header   then
              在每个列头上加入控件checkbox,同时将   checkbox   放入headchecks,以列头为key
      end   if

在后边的事件中,直接根据列头从headchecks检索出checkbox控件。
发表于:2007-06-30 16:15:073楼 得分:0
问题解决了,非常感谢!


快速检索

最新资讯
热门点击