ASP.NET GridView Multiple Edit Rows At Same Time

insaine

New Member
In ASP.NET 4.0 GridView, is it possible to have multiple rows in edit mode at the same time?I'm controlling the rows with edit mode in a property:\[code\]Private Property Editing As List(Of Integer) Get If ViewState("Editing") Is Nothing Then ViewState("Editing") = New List(Of Integer) Return CType(ViewState("Editing"), List(Of Integer)) End Get Set(value As List(Of Integer)) ViewState("Editing") = value End SetEnd Property\[/code\]Populating it when the user clicks on edit button:\[code\]Protected Sub GridView1_RowCommand(sender As Object, e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand If e.CommandName = "Edit" Then Dim row = CType(CType(e.CommandSource, LinkButton).NamingContainer, GridViewRow) Editing.Add(row.RowIndex) End IfEnd Sub\[/code\]And changing the RowState property manually in the RowDataBound event:\[code\]Protected Sub GridView1_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If Editing.Contains(e.Row.RowIndex) Then Then e.Row.RowState = DataControlRowState.Edit End If End IfEnd Sub\[/code\]But it's not working, the rows is being rendered in the normal state... any ideias?
 
Back
Top