Bind datatable to a datagrid

  • Thread starter Thread starter SALIH ATAOZ
  • Start date Start date
S

SALIH ATAOZ

cnn.Open()
Dim sql As String = "select * from kayitlar;"
Dim dt As New DataTable()
Dim dausers As New OleDb.OleDbDataAdapter(sql, cnn)
dausers.Fill(dt)
DataGrid1.SetDataBinding(dt, "kayitlar")

somethings wrong i cant fill the datagrid
 
How do I clear the datagrid in order to fill in it again ?
In my case the sql is "Select * from Table1 where...."

Everytime I fill in the datagrid I need to clear it before fill in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top