62,041
社区成员
发帖
与我相关
我的任务
分享
foreach (GridViewRow gvr in GridView1.Rows)
{
TextBox txt=(TextBox)gvr.FindControl("txtID");
//...
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
TextBox tb = (TextBox)(e.Row.Cells[0].FindControl("TextBoxID"));
string s = tb.Text;
}
}
var tb = document.getElementById("GrieViewID")//找到DataGrid
for(var i=1;i<tb.rows.length;i++)
{ //遍歷行
for(var j =0;j<tb.rows[i].cells.length;j++)
{//遍歷列