MSFLEXGRID control 
Author Message
 MSFLEXGRID control

Hi,

I use MSFLEXGRID and didn't bind to the database. I use my own code to fill
in the gird with my own recordset
How should I clear off the content from the Grid ?

For i = 1 to grd.rows -1     this give me and error , cannot remove the row
which is the fix row
    grd.removeitem(i)
next

Now, what I did is simply set the grd.rows = 1
and by doing this it only show the first row, the title and all the rows
from the previous search will be clear off (very fast)
my question is, when i set the grd.rows = 1 , the data in the grd is
actually clear off ? free up the memory ?

thanks



Wed, 30 Jan 2002 03:00:00 GMT  
 MSFLEXGRID control
Hi,
    Try   GridName.Clear.
Then on your next pass just re adjust your Rows & Cols. I wouldn't think you
would need to set your Rows to 1. It may be faster to add or remove a few
rows than to set the Rows to 1 and start over. HTH

Mark H.



Quote:
> Hi,

> I use MSFLEXGRID and didn't bind to the database. I use my own code to
fill
> in the gird with my own recordset
> How should I clear off the content from the Grid ?



Wed, 30 Jan 2002 03:00:00 GMT  
 MSFLEXGRID control
Try
For i = grd.rows -1 to 1 step -1
(After the first loop the way you have it grd(i) does not exist)

--
Francis
ControlDraw Ltd
http://www.controldraw.co.uk



Quote:
> Hi,

> I use MSFLEXGRID and didn't bind to the database. I use my own code to
fill
> in the gird with my own recordset
> How should I clear off the content from the Grid ?

> For i = 1 to grd.rows -1     this give me and error , cannot remove the
row
> which is the fix row
>     grd.removeitem(i)
> next

> Now, what I did is simply set the grd.rows = 1
> and by doing this it only show the first row, the title and all the rows
> from the previous search will be clear off (very fast)
> my question is, when i set the grd.rows = 1 , the data in the grd is
> actually clear off ? free up the memory ?

> thanks



Thu, 31 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help needed with msflexgrid control and mschart control

2. how to resize the treeview control or msflexgrid control when runing

3. Problem with MSFlexgrid control

4. Problem with MSFlexgrid control

5. MsFlexGrid Control - Highlighting a row

6. Problem with MSFlexgrid control

7. Problem with MSFlexgrid control

8. Problem with MSFlexgrid control

9. Problem with MSFlexgrid control

10. Urgent about MSFlexGrid control

11. Problem with MSFlexgrid control

12. Getting XML from a MSFlexGrid control

 

 
Powered by phpBB® Forum Software