467,083 Members | 1,259 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,083 developers. It's quick & easy.

Clear data in DataGridView

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

Aug 16 '07 #1
  • viewed: 10576
Share:
1 Reply
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

"Huy Nguyen" <HN*****@gcprestress.localschreef in bericht
news:4D**********************************@microsof t.com...
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
Aug 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Rick Shaw | last post: by
6 posts views Thread by Bill Nguyen | last post: by
2 posts views Thread by cameljs18@yahoo.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.