Clear data in DataGridView

  • Thread starter Thread starter Huy Nguyen
  • Start date Start date
H

Huy Nguyen

Hello all
I've been trying to do a little project here and i am stuck at the
point where I can not clear the data out of datagridview table. I've done
lots of reading from different sources on internet. Most of the suggestion
is put this line of code in > DataGridView1.Rows.Clear() < This line
never work and if give me and ArgumentException Error. Could any one please
help me out. I am using vb 2005. Thanks
HN
 
Huy,

A datagridview is normally accessed by its underlying datatable. If you
clean that than it is empty. Or even more simple.

DataGridView1.datasource = nothing

Cor
 
Back
Top