|
楼主 |
发表于 2021-4-22 21:45:01
|
显示全部楼层
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
for (int i =1; i <GridView1.Rows.Count; i++)
{
Button but = (Button)e.Row.FindControl("bt");
GridViewRow drow = GridView1.Rows[i];
string s = drow.Cells[1].Text;
but.Text = s;
Response.Write(i);
}
}
}
第一个but的text为空,后面的数据怎么对不上号啊`` 错开了一位` |
|