|
|
|
| Доброго дня! Помогите пожалуйста подсоединяю Gridview по средством линк то скюэль,
Dim db = New BasesDataContext()
Dim pole = From p In db.aspnet_Users Order By p.UserName Select p.UserName, p.UserProfile.HomeTown, _
p.UserProfile.Tel, p.aspnet_Membership.Email
GridView1.DataSource = pole
GridView1.DataBind()
но потом мне надо редактировать поля, и я добавляю
Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
'Set the grid's EditIndex and rebind the data
GridView1.EditIndex = e.NewEditIndex
BindUserGrid1()
и
Protected Sub GridView1_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView1.RowCancelingEdit
'Revert the grid's EditIndex to -1 and rebind the data
GridView1.EditIndex = -1
BindUserGrid1()
End Sub
Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating
'Exit if the page is not valid
If Not Page.IsValid Then
Exit Sub
End If
Dim UserName As String = GridView1.DataKeys(e.RowIndex).Value.ToString()
Dim UserInfo As MembershipUser = Membership.GetUser(UserName)
Membership.UpdateUser(UserInfo)
GridView1.EditIndex = -1
BindUserGrid1()
End Sub
но строка не обновляется... , где косяк то?
Заранее блогодарю! | |
|
|