Putting a gridview row in edit mode programmatically

前端 未结 5 365
名媛妹妹
名媛妹妹 2020-12-11 01:11

How do I put a gridview row in edit mode programmatically?

5条回答
  •  温柔的废话
    2020-12-11 02:12

    Just implement the Row_Editing event and do something like this:

    protected void Row_Editing(object sender, GridViewEditArgs e) 
    {
      myGridView.EditItemIndex = e.EditItemIndex; 
      BindData(); 
    }
    

    Bind data will populate the GridView with the data.

提交回复
热议问题