I have a Dataset with 2 different tables. What I have to do is to display those tables in a DataGridView. What I have done with a reference is given below.
sqlCmd.CommandText = "AutomateKDB"
sqlCmd.CommandType = CommandType.StoredProcedure
sqlCmd.Connection = Connection
sqlCmd.ExecuteNonQuery()
sqlDaK1 = New SqlDataAdapter(sqlCmd)
sqlDaK1.Fill(Kds, "KA")
sqlCmdeA.CommandText = "AutomateeAudIT_KAData"
sqlCmdeA.CommandType = CommandType.StoredProcedure
sqlCmdeA.Connection = Connection1
sqlCmdeA.ExecuteNonQuery()
sqlDaeK1 = New SqlDataAdapter(sqlCmd)
sqlDaeK1.Fill(Kds, "eK")
GridKnowledge.DataSource = Kds
But this is not working. Please help me with this.
Thanks In Advance.,
Here’s a solution that was posted to the msdn forums sometime ago.
http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0a63a483-5b15-40d6-afb4-8add6b4f244f
Alternatively, you might consider mixing winform and wpf, where I believe this is relatively easy…