Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Refreshin' MSHFlexGrid Optimisation


Reply
 
Thread Tools Display Modes
  #1  
Old 09-05-2001, 10:09 AM
sethindeed's Avatar
sethindeed sethindeed is offline
Contributor
 
Join Date: Mar 2001
Location: Montreal Canada
Posts: 715
Default 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...
Reply With Quote
  #2  
Old 09-05-2001, 11:50 AM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default 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
Reply With Quote
  #3  
Old 09-05-2001, 12:06 PM
sethindeed's Avatar
sethindeed sethindeed is offline
Contributor
 
Join Date: Mar 2001
Location: Montreal Canada
Posts: 715
Default Re: Refreshin' MSHFlexGrid Optimisation

Hum...I was already doing this

__________________
What I don't know keeps me excited...
Reply With Quote
  #4  
Old 09-05-2001, 12:13 PM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default 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
Reply With Quote
  #5  
Old 09-05-2001, 12:21 PM
sethindeed's Avatar
sethindeed sethindeed is offline
Contributor
 
Join Date: Mar 2001
Location: Montreal Canada
Posts: 715
Default 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...
Reply With Quote
  #6  
Old 09-05-2001, 09:01 PM
Anis's Avatar
Anis Anis is offline
| Coder XXX |

Retired Leader
 
Join Date: Jun 2001
Location: Kuala Lumpur, Malaysia.
Posts: 3,018
Default 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!!........."
__________________
Regards,
Muhammad Anis Ur Rehman

Miles to go Before I Sleep.

http://www.projekcarpet.com/anis.html
Reply With Quote
  #7  
Old 09-05-2001, 09:19 PM
dcl3500's Avatar
dcl3500 dcl3500 is offline
Mostly Harmless?

Retired Moderator
* Expert *
 
Join Date: Jun 2001
Location: Western Illinois, USA
Posts: 2,398
Default 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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->