Could you please tell me how to clear the old data from the datagridview in vb.net..
the below code is retrieving the data from table and display in a gridview for particular person. but when i wanna check the next person record if he dosen't have record so the previous data still will not erased?
Dim c As New sqlStmt
c.myCon()
Dim da As New SqlDataAdapter("SELECT * FROM Experience WHERE CID='" & Trim(txtCID.Text) & "'", c.con)
Dim ds As New DataSet("ManPower")
da.Fill(ds, "ManPower")
dgExperience.DataSource = ds.Tables("ManPower").DefaultView