Home All Groups Group Topic Archive Search About

Loading data in the flexgrid takes long time

Author
6 Jan 2006 10:15 PM
schapopa
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(MSFlexGrid1PLSummary.Row,
MSFlexGrid1PLSummary.Col, sqldr("date1") & "q-" & sqldr("date2"))

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

MSFlexGrid1PLSummary.Row = 2

If Not IsNothing(sqldr("Date2")) Then
MSFlexGrid1PLSummary.set_TextMatrix(MSFlexGrid1PLSummary.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 ***

Author
6 Jan 2006 11:27 PM
Cor Ligthert [MVP]
Schapopa,

As forever in this newsgroup ask I. Can the first one who completely
succesful used the FlexGrid in .Net reply and tell us how.

For the others I advice to use the datagrid instead.

There are no replies on the using on the flexgrid, there are replies who
tell that they did not know that using the datagrid was so easy.

To see a lot of samples using the datagrid without database, have a look at
our website. 50% of the datagrid tips are done without database.

http://www.vb-tips.com/default.aspx

Cor

[attached file: De Internet Explorer-browser starten.lnk]
Author
6 Jan 2006 11:31 PM
Cor Ligthert [MVP]
Hi

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

Cor
Author
7 Jan 2006 9:54 AM
schapopa
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 ***
Author
7 Jan 2006 10:35 AM
schapopa
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 ***
Author
7 Jan 2006 12:13 PM
Cor Ligthert [MVP]
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/library/system.windows.forms.datagridtextbox_members.aspx

I hope this helps,

Cor

<schapopa> schreef in bericht
Show quoteHide quote
news:%23KbMfY3EGHA.3036@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 ***
Author
6 Mar 2006 2:52 PM
Peter Proost
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]" <notmyfirstn***@planet.nl> schreef in bericht
news:Oab85O4EGHA.376@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/library/system.windows.forms.datagridtextbo
x_members.aspx
Show quoteHide quote
>
> I hope this helps,
>
> Cor
>
> <schapopa> schreef in bericht
> news:%23KbMfY3EGHA.3036@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 ***
>
>