 |
 |

09-05-2001, 10:09 AM
|
 |
Contributor
|
|
Join Date: Mar 2001
Location: Montreal Canada
Posts: 715
|
|
Refreshin' MSHFlexGrid Optimisation
|
Somebody knows how to speed up the Refresh process of an MSHFlexGrid. I am calling a recordset into an ADO recordset, then refreshing the grid. THe problem is that it is quite slow when I have more than 3000 records...
Thanx
|
__________________
What I don't know keeps me excited...
|

09-05-2001, 11:50 AM
|
 |
Code Meister
Retired Moderator * Guru *
|
|
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
|
|
Re: Refreshin' MSHFlexGrid Optimisation
|
Set the VISIBLE property of the flexgrid to FALSE. Then do your updates. Then set the VISIBLE property back to TRUE.
As long as you don't have any doevents in your code where you load the update, the flexgrid won't actually have time to disappear.
Use timing functions, like timeGetTime, to figure out how much time you saved and let us know....
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
|
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
|

09-05-2001, 12:06 PM
|
 |
Contributor
|
|
Join Date: Mar 2001
Location: Montreal Canada
Posts: 715
|
|
Re: Refreshin' MSHFlexGrid Optimisation
Hum...I was already doing this
|
__________________
What I don't know keeps me excited...
|

09-05-2001, 12:13 PM
|
 |
Code Meister
Retired Moderator * Guru *
|
|
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
|
|
Re: Refreshin' MSHFlexGrid Optimisation
|
In that case....how about posting some code....
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
|
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
|

09-05-2001, 12:21 PM
|
 |
Contributor
|
|
Join Date: Mar 2001
Location: Montreal Canada
Posts: 715
|
|
Re: Refreshin' MSHFlexGrid Optimisation
|
Let's see. It looks like this right now :
MainFilter = "Select * From rqtGlobal where AssignedTo ='" &lblAssignedTo &"'"
MSFlexGrid1.Visible=false
DoEvents
AdoConn.Close
With AdoConn
.ConnectionString = strConnect
.Open
End With
Cmd1.ActiveConnection = AdoConn
Cmd1.CommandText = MainFilter
rsConn.Open Cmd1, , adOpenStatic, adLockReadOnly
Set MSFlexGrid1.Recordset = rsConn
MSFlexGrid1.Visible=True
Is it possible to optimize it more than that ( it is getting slow only for 3000 or more records )
|
__________________
What I don't know keeps me excited...
|

09-05-2001, 09:01 PM
|
 |
| Coder XXX |
Retired Leader
|
|
Join Date: Jun 2001
Location: Kuala Lumpur, Malaysia.
Posts: 3,018
|
|
Re: Refreshin' MSHFlexGrid Optimisation
|
i think the visible property is the only best solution..
i also have been having problem in Msflexgrid..
coz i was populating my flexgrid with about Database of 5000 + records.. And i am still stuck in terms of optimizing it more..
anis
"Miles to Go Before I Sleep!!........."
|
|

09-05-2001, 09:19 PM
|
 |
Mostly Harmless?
Retired Moderator * Expert *
|
|
Join Date: Jun 2001
Location: Western Illinois, USA
Posts: 2,398
|
|
Re: Refreshin' MSHFlexGrid Optimisation
|
If you working with an Access Jet db then use DAO. It is truly faster than ADO against a Jet db.
Don
Time is the best teacher; unfortunately it kills all its students.
|
__________________
Don
"So long and thanks for all the fish.'" - Douglas Adams.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|