By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,686 Members | 1,558 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,686 IT Pros & Developers. It's quick & easy.

Loading data in the flexgrid takes long time

P: n/a
I have a flex grid and I am loading data to this flex grid in this way
While sqldr.Read
j = j + 1

MSFlexGrid1PLSummary.set_TextMatrix(MSFlexGrid1PLS ummary.Row,
MSFlexGrid1PLSummary.Col, sqldr("date1") & "q-" & sqldr("date2"))

MSFlexGrid1PLSummary.Row = 1
MSFlexGrid1PLSummary.CellFontBold = True
If Not IsNothing(sqldr("Total1")) Then
MSFlexGrid1PLSummary.set_TextMatrix(MSFlexGrid1PLS ummary.Row,
MSFlexGrid1PLSummary.Col, VB6.Format(sqldr("Total1"), "##,##0.00"))
End If

MSFlexGrid1PLSummary.Row = 2

If Not IsNothing(sqldr("Date2")) Then
MSFlexGrid1PLSummary.set_TextMatrix(MSFlexGrid1PLS ummary.Row,
MSFlexGrid1PLSummary.Col, VB6.Format(sqldr("Date2"), "##,##0.00"))
End If

etc...
and I have about 100 rows.

With 9 records that I have filling this flexgrid takes about 4 second.
Then I have few flexgrids on tabs, so the whole form is running very
slow.
Query itself in query analyzer runs immediatelly: 0 second.
I use flexgrid because I have grouping of data and didn't find out how
can I use datagrid for the same display of data.

How can I improve performance of that form?
Thank you
Schapopa

*** Sent via Developersdex http://www.developersdex.com ***
Jan 6 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi

suddenly I see a link in my message, I don't know how that came there.

Cor
Jan 6 '06 #2

P: n/a
Thank you for your reply. I will try to learn more about datagrids and
maybe replace existing flexgrid with that control.
Cheers
Schapopa


*** Sent via Developersdex http://www.developersdex.com ***
Jan 7 '06 #3

P: n/a
As I am looking through your webside and examples that you posted I am
wondering if it is possible to have first column of the grid to be just
a text, something like in flex grid:

MSFlexGrid1PLSummary.set_TextMatrix(1, 0, "TOTAL SALES")

and then the remaining part of the row filled with data.
Thank you
Schapopa


*** Sent via Developersdex http://www.developersdex.com ***
Jan 7 '06 #4

P: n/a
Schapopa,

There are with the styles a lot of possibilities almost the same as with the
normal textbox. You can by instance make a column enable false or set it to
read only.

http://msdn2.microsoft.com/en-us/lib...x_members.aspx

I hope this helps,

Cor

<schapopa> schreef in bericht
news:%2****************@tk2msftngp13.phx.gbl...
As I am looking through your webside and examples that you posted I am
wondering if it is possible to have first column of the grid to be just
a text, something like in flex grid:

MSFlexGrid1PLSummary.set_TextMatrix(1, 0, "TOTAL SALES")

and then the remaining part of the row filled with data.
Thank you
Schapopa


*** Sent via Developersdex http://www.developersdex.com ***

Jan 7 '06 #5

P: n/a
Hi, I saw your post when doing some googling on the datagrid, and just a tip
for you and future googlers to speed up the flexgrid is using the
flexgrid.redraw property, befor loading the data set flexgrid.redraw = false
then after the loading is done, set flexgrid.redraw = true.

Hth

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

"Cor Ligthert [MVP]" <no************@planet.nl> schreef in bericht
news:Oa*************@TK2MSFTNGP12.phx.gbl...
Schapopa,

There are with the styles a lot of possibilities almost the same as with the normal textbox. You can by instance make a column enable false or set it to read only.

http://msdn2.microsoft.com/en-us/lib...datagridtextbo
x_members.aspx
I hope this helps,

Cor

<schapopa> schreef in bericht
news:%2****************@tk2msftngp13.phx.gbl...
As I am looking through your webside and examples that you posted I am
wondering if it is possible to have first column of the grid to be just
a text, something like in flex grid:

MSFlexGrid1PLSummary.set_TextMatrix(1, 0, "TOTAL SALES")

and then the remaining part of the row filled with data.
Thank you
Schapopa


*** Sent via Developersdex http://www.developersdex.com ***


Mar 6 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.