HOW CAN I DELETE ALL RECORDS ON A DATAGRID TABLE IN JUST ONE BUTTON..

try this

Datagrid1.DataSource = Nothing

and also try this

Datagrid1.Clear

hope this helps you . . .

i got an error saying "Method or Data Member not Found!"..huhuhuhu is it possible to delete all the records in just one button?

So you want to delete everything in the DataGrid, (recordset)

Private Sub Delete_cmd_Click
    Do While Not Adodc1.Recordset.EOF
        Adodc1.Recordset.MoveFirst
        Adodc1.Recordset.Delete
        Adodc1.Recordset.Update
        Adodc1.Recordset.MoveNext
    Loop
End Sub

i got an error sir.. pls look at the picture that i uploaded.thanx

its ok and well working sir..thanx a lot!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.