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.
 
Back
Top