Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Refreshing a ULTRAGRID VIEW
posted

Hi Team

Please help me to resolve my issue with gridview refresh.

I am using ULTRAGRID View for displaying user information. There is a tabbed manager control in my MDI form

The user details screen is having Add user toolbar. When clicked on this it will open another tab for adding user. When the user is added to the db, onclosing event of this form  I am refreshing the user details screen (ie re binding the data from db.) but the data inside the gridview is not reloading (not able to see the newly added record)

I am using VB.net

//User Add formclose event.

Private Sub frmUserAdd_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing

Using frmU As New frmUser

            frmU.RefreshGrid()

End Using

End Sub

//Below is the code for Gridview details page refreshGrid

Public Sub RefreshGrid()
        Try

            Dim RmUser As New RateMappingUser()
            Dim ds As New DataSet
            RmUser.connectionString = gHiveConnectionString
            ds = RmUser.GetAllUsers()
            grdAllUsers.DataSource = ds.Tables(0)
            If grdAllUsers.Rows.Count > 0 Then
                grdAllUsers.Rows(0).Selected = True
            End If
            CommonSettings.SetGridSettings(grdAllUsers)
        Catch ex As Exception
            Using frmErr As New frmException(ex.Message, ex.InnerException.ToString())
                frmErr.ShowDialog()
            End Using
        End Try
    End Sub

End Class
 
Thanks in advance
Parents Reply Children
No Data