-
Nov 4th, 1999, 08:48 PM
#1
Thread Starter
Lively Member
What is the best method of clearing an msFlexGrid control?
I originally used the following code to clear a grid, but I wanted to use a quicker method, because there could sometimes be fair amount of rows on the grid.
Code:
Do While MSFlexGrid1.Rows > 1
MSFlexGrid1.RemoveItem(1)
Loop
'Grid is cleared
I now use the following code, because it is quicker, however the Clear method clear's Column header's, so I have to reset them each time.
Code:
MSFlexGrid1.Clear
MSFlexGrid1.Rows = 1
'Grid is cleared - re-enter the column headers
Is there a better way of clearing the grid without having to reset the column headers?
I'm not sure if this works. It appears to clear all rows from the grid and leave the column header's, but it just seems too simple.
Any advice/comments would be grately appreciated.
[This message has been edited by Ishamel (edited 11-05-1999).]
-
Nov 4th, 1999, 09:29 PM
#2
Yes, it is the best way to clear the grid.
Remember, less is more.....LOL
Regards,
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819
-
Nov 4th, 1999, 09:47 PM
#3
Thread Starter
Lively Member
Cheers Serge,
I had a funny feeling it would be that simple.
-
Jan 6th, 2000, 02:23 PM
#4
New Member
I would certainly use
FG.Rows = 1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|