Asp.Net/c#疑问? TextBox labelID=(TextBox)e.Item.Cells[2].Controls[0];这句话是不是有问题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 什么错误呢其次,你不用DataGrid tmpDg=(DataGrid)source;吧一般找ID都是通过DataKeyField来的 我想得到项模板中的控件Label的值,该怎么得到呢?一般: DataGrid tmpDg=(DataGrid)source; TextBox labelID=(TextBox)e.Item.Cells[2].Controls[0]; ...........是得到编辑模板中的控件,但我是想得到项模板中的控件的值。该怎么写代码呀? 我想得到项模板中的控件Label的值,该怎么得到呢?一般: DataGrid tmpDg=(DataGrid)source; TextBox labelID=(TextBox)e.Item.Cells[2].Controls[0]; ...........是得到编辑模板中的控件,但我是想得到项模板中的控件的值。该怎么写代码呀? CheckBoxcb1=(CheckBox)dgLevel.Items[i].Cells[3].Controls[1];bool a=cb1.Checked;这是我写的,不知道对你有没有帮助 我这里有个总结,不知道对你有没有帮助里面阐述了模板列http://blog.csdn.net/brightheroes/archive/2004/11/13/180201.aspx DataGrid tmpDg=(DataGrid)source; TextBox labelID=((TextBox)e.Item.Cells[2].Controls[0]).Text; ........... 求思路 C#写txt文档最快的方法 c# VS2008生成软件时报错 byte数组如何去掉空闲空间 关于AxWebBrowser中使用X509Certificate的方法? GV显示合计的问题。 介绍一个提供C#程序例子和源代码的网站给我吧!!! 两个问题 一个webbrowser一个窗体关闭 得到桌面的抓图,并存为form的背景,不用api怎么做? 请问C#根VC相比,在底层编程方面是否一样的? 有谁做过定时程序
其次,你不用DataGrid tmpDg=(DataGrid)source;吧
一般找ID都是通过DataKeyField来的
一般:
DataGrid tmpDg=(DataGrid)source;
TextBox labelID=(TextBox)e.Item.Cells[2].Controls[0];
...........
是得到编辑模板中的控件,但我是想得到项模板中的控件的值。
该怎么写代码呀?
一般:
DataGrid tmpDg=(DataGrid)source;
TextBox labelID=(TextBox)e.Item.Cells[2].Controls[0];
...........
是得到编辑模板中的控件,但我是想得到项模板中的控件的值。
该怎么写代码呀?
bool a=cb1.Checked;
这是我写的,不知道对你有没有帮助
里面阐述了模板列
http://blog.csdn.net/brightheroes/archive/2004/11/13/180201.aspx
DataGrid tmpDg=(DataGrid)source;
TextBox labelID=((TextBox)e.Item.Cells[2].Controls[0]).Text;
...........