I have a gridview that is populated and a button outside the gridview that I want to enable editing on the selected row when clicked. I have this in the code behind. What goes in the button event to invoke the grid view editing?
Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As GridViewEventArgs) GridView1.EditIndex = e.NewEditIndex FillGrid() End Sub Protected Sub btnEdit_Click(ByVal sender as Object, ByVal e As System.EventArgs) Handles btnEdit.Click What goes here?? End Sub
I'm not sure what arguments to pass to the GridView1_RowEditing from the btnClick. I don't want a column with an edit button on every row. I have a gridview with 5 columns. On the btnClick, I want 4 of the cells in the selected row to open as textbox for editing. I would like a seperate button outside the gridview that the user can click to enable editing of the selected row.
Edited by deceptikon: Moved to VB.NET