after the databind, tryTable t = (Table)DataGrid1.Controls[0];
string s = t.Rows[0].Cells[1].Text;
string s = t.Rows[0].Cells[1].Text;
解决方案 »
- 关于Repeater的ItemDataBound事件
- 新人!怎样循环访问控件(textbox)
- jquery实现单选按钮组选中的值
- 入门生问题:ajaxpro可以执行数据库的insert或update吗?
- 数据绑定的时候使用数据视图
- [基础]asp.net里的form(高手勿入!)
- web.config 的问题?
- 我的这个存储过程有问题吗?
- web窗体,winform,ActiveX及设计模式的讨论~
- 如何在进行程序部署时,加入一个I agreement 窗口(让用户接受法律协议的窗口)!!!*****急
- 如何做表单验证,使Session过期后自动跳到登录页!!急
- 给datagrid做右键,该如何实现啊,各位大侠帮帮忙!!
你是不是没有先绑定就执行取headertext代码?
试一下:
//...
DataGrid1.DataBind();
//...你要取headertext的代码
after the databind, tryTable t = (Table)DataGrid1.Controls[0];
string s = t.Rows[0].Cells[1].Text;s的值为空。怎么办。
DataGrid1.DataBind();
Table t = (Table)DataGrid1.Controls[0];
string s = t.Rows[0].Cells[1].Text;s的值为空??
绑定之后取一下columns.count看看是多少先
DataGrid1.DataBind();
Table t = (Table)DataGrid1.Controls[0];
string s = t.Rows[0].Cells[1].Text;s的值为空??是的,当 DataGrid 的 AllowSorting=true的时候这个时候如何取呢?