protected void gdView_RowDataBound(object sender, GridViewRowEventArgs e)
{
Label a=new Label();a.ID="a";a.Text="abc";
e.Row.Cells[0].Controls.Add(a);
}为什么用gdViewRow.Rows[i].Cells[0].FindControl("a")找不到
{
Label a=new Label();a.ID="a";a.Text="abc";
e.Row.Cells[0].Controls.Add(a);
}为什么用gdViewRow.Rows[i].Cells[0].FindControl("a")找不到
解决方案 »
- 将VB代码转成C#代码!
- sqlite 获取最近生日用户的方法?
- RequiredFieldValidator验证控件不能为空的问题!
- 请教 C# 如何实现类似 Project 的甘特图.
- 数据库更新问题 (Exception e1)E1 为insert into 语句的语法错,为什么???
- DELPHI与BCB通过ADOConnection就知取到库中的所有表名,C#能不能通过OleDbConnection也能取到呢?
- GDI 贴图求教各位高手,谢谢!!!
- 关于属性(Attributes)的问题
- 请教StreamReader的超时问题
- 关于C#的speechLib使用,我怎么根据电脑已安装的语音库,按照名字选择我需要的语音?
- ...........................................
- DataGridView 刷新
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView data = (DataRowView)e.Row.DataItem;
Label lblInquiryDate = (Label)e.Row.FindControl("lblInquiryDate");
...
...如果知道具体哪一行的话Label lblOrderDate = (Label)grd.Rows[0].FindControl("lblOrderDate");