Always great to hear from you.
Thank you for the feedback.
I tried this code:
Private Sub fillSourceRecords()
Dim conn_str As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Using con As SqlConnection = New SqlConnection(conn_str)
Using sourcecmd As SqlCommand = New SqlCommand()
sourcecmd.CommandText = "uspGetEthicsRecs"
sourcecmd.CommandType = CommandType.StoredProcedure
sourcecmd.Connection = con
Using sda As SqlDataAdapter = New SqlDataAdapter(sourcecmd)
Dim dt As DataTable = New DataTable()
Gridview1.DataSource = dt
And then on the ValidateEmp sub, I would call this routine as:
The problem with this code is that even though it displays data on the gridview.
However, when I enter another empID, it doesn't replace the original data with the data that is associated with the current empID.
This is one of those applications that uses gridview to add dynamic rows as needed.
It is a lot of code and very complicated. It took almost six months to get it to work with some of the help coming from you.
If you would like to see the rest of code, please let me know as the solution that I am looking for may be hidden in one of the codes but I am not able to figure it out.