I have a grid view with an edit button. This pops a modal popup control. My gridview does paging and sorting.
I am able to edit fine but once the edit is done I need to refresh the page with new data. I am not sure how to do that while maintaining my page.
The one thing I tried was call the bind control in my close button of the modal popup
Protected Sub btnclose_click(ByVal sender As Object, ByVal e As EventArgs)
mdlPopup.Hide()
BidGrid()
End Sub
But it does not seem to update the grid. I am able to step through the code but the gridview is not updated
Here is a snipet of my bind code
Private pds As New PagedDataSource
Private Sub BindGrid()
Dim _otimeMyTime As New clsTime
Dim dt As DataTable = _otimeMyTime.GetProjects(10).Tables(0)
Dim dv As DataView = dt.DefaultView
If Not Me.ViewState("SortExp") Is Nothing Then
dv.Sort = Me.ViewState("SortExp").ToString + " " + Me.ViewState("SortOrder").ToString
End If
pds.DataSource = dv
pds.AllowPaging = True
pds.PageSize = 10
pds.CurrentPageIndex = CurrentPage
lnkbtnNext.Enabled = Not pds.IsLastPage
lnkbtnPrevious.Enabled = Not pds.IsFirstPage
gvProjects.DataSource = pds
gvProjects.DataBind()
doPaging()
End Sub
Can someone please tell me what I am doing wrong.
Thank you,