我做了一个GridView在里面有一个列为:CustomerID
我该怎么获得当前行的CustomerID啊
得到CustomerID后,我想在根据CustomerID 查询后绑定到本行的BulletedList

解决方案 »

  1.   

    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
    string customerID= e.Keys[0].Tostring();
    }
      

  2.   

    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
    string customerID= e.Keys["CustomerID"].Tostring();
    }
      

  3.   

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex > -1)
        {
            DataRowView row = (DataRowView)e.Row.DataItem;
            string CustomerID = row["CustomerID"].ToString();        //DataList BulletedList = (DataList)e.Row.FindControls("BulletedList");
        }
    }
      

  4.   

    并不是在GridView1_RowUpdating是触发的啊
    是在绑定的同时触发的