Hi,
I am trying to manually edit a gridview and get the updated values. The values will then be passed to tbe middle tier. Due to this, I am manually setting up the data source and binding it. My code binds the data correctly, displays it and so on, but when I actually edit any columns and click Update, I can not see that the values are in the columns.
Any ideas???
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
BindData()
End Sub
Private Sub BindData()
Dim BindData As DataSet
BindData = UserContext.Controller.SelectAllRoles
gvRoles.DataSource = BindData
gvRoles.DataBind()
End Sub
Private Sub gvRoles_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvRoles.PageIndexChanging
gvRoles.PageIndex = e.NewPageIndex
gvRoles.DataBind()
End Sub
Private Sub gvRoles_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gvRoles.RowEditing
gvRoles.EditIndex = e.NewEditIndex
DataBind()
End Sub
Private Sub gvRoles_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gvRoles.RowUpdating
'UserContext.Controller.UpdateRole(RoleID:=a, RoleName:=b, RoleDescription:=c, Status:=0)
gvRoles.EditIndex = -1
DataBind()
End Sub
Private Sub gvRoles_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles gvRoles.RowCancelingEdit
gvRoles.EditIndex = -1
DataBind()
End Sub
I am trying to manually edit a gridview and get the updated values. The values will then be passed to tbe middle tier. Due to this, I am manually setting up the data source and binding it. My code binds the data correctly, displays it and so on, but when I actually edit any columns and click Update, I can not see that the values are in the columns.
Any ideas???
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
BindData()
End Sub
Private Sub BindData()
Dim BindData As DataSet
BindData = UserContext.Controller.SelectAllRoles
gvRoles.DataSource = BindData
gvRoles.DataBind()
End Sub
Private Sub gvRoles_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvRoles.PageIndexChanging
gvRoles.PageIndex = e.NewPageIndex
gvRoles.DataBind()
End Sub
Private Sub gvRoles_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gvRoles.RowEditing
gvRoles.EditIndex = e.NewEditIndex
DataBind()
End Sub
Private Sub gvRoles_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gvRoles.RowUpdating
'UserContext.Controller.UpdateRole(RoleID:=a, RoleName:=b, RoleDescription:=c, Status:=0)
gvRoles.EditIndex = -1
DataBind()
End Sub
Private Sub gvRoles_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles gvRoles.RowCancelingEdit
gvRoles.EditIndex = -1
DataBind()
End Sub