返回首页

我想从一个GridView中插入多行数据到至少4列的数据库。 GridView是没有文本框...

关于
萨比尔贾尼。| Sabirj:Vasim889 | |

 bool firstTime = true;

 

    System.Data.DataTable dt;

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)

    {

        if (e.Row.RowType == DataControlRowType.DataRow)

            if (this.firstTime)

            {

                System.Data.DataView dv =

                     (e.Row.DataItem as System.Data.DataRowView).DataView;

                this.dt = dv.ToTable();

                this.Label1.Text = dt.Rows.Count.ToString();

                this.firstTime = false;

            }

回答