• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

Clearing DBGrid

How do you clear an unbound DBGrid after loading it with an array.  The ClearFields method does not work, but that is exactly what I want it to do.  Please help!
0
globe
Asked:
globe
1 Solution
 
majed100598Commented:
dbgrid1.fixedrows=0
dbgrid.rows=1

then define the number of fixed rows and columns you want
0
 
globeAuthor Commented:
There's no FixedRow or Rows property/method for DBGrid in VB5.  
0
 
myqlGCommented:
he was almost right
dbgrid1.rows=1
dbgrid1.cols=1
(You can try 0 but I think that creates an error)
There is also a dbgrid1.clearfields
good luck
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
globeAuthor Commented:
Again, the Rows property does not apply to DBGrid in VB5, although the Help file claims that it does.
0
 
MirkwoodCommented:
Maybe it is not an easy question?
0
 
MirkwoodCommented:
Ok, so far 10000 points I tell you that DBGrid1.ClearFields might do what you want.
Oeps, I already gave you the answer :-(
0
 
globeAuthor Commented:
I stated in my question that  the Clearfields method will give me exactly what I want.  However, I can not make it to work with unbound DBGrid.  In fact, it does nothing.  I found myself a work-around already.  Thanks though.
0
 
vinoopaulsCommented:
redim the array to nothing and refresh the dbgrid
this will clear the unbound dbgrid for you
0
 
globeAuthor Commented:
Thank You!  This works!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now