View previous topic :: View next topic |
Author |
Message |
arcray Valued Contributor
Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Thu Jan 09, 2003 5:57 am Post subject: Number of rows in the GRID component of the VDSOBJ.DLL |
|
|
I ask because I read in rows from a database and display in a GRID, but the display maxes out at 50 rows. Whilst %A can reach 200, only 50 actual rows are shown in the GRID.
Is there a limit?
Code follows:-
Code: | DIALOG SHOW,LISTSGROUP
OBJECT CLASS,FLUSTER
OBJECT ADD,GRID,GRID1,0,0,800,600,20,50,90,16,SCROLL,DBLCLICK,READONLY
OBJECT SETCELL,GRID1,ROW,0,QuoteNo|Renewal Date|Business|BusinessType|PostCode|BuildingsSI|ContentsSI|StockSI|Gross|IPT|Net|OnCoverYN
OBJECT SETCELLSIZE,GRID1,COLUMN,0,40
OBJECT SETCELLSIZE,GRID1,COLUMN,1,60
OBJECT SETCELLSIZE,GRID1,COLUMN,2,120
OBJECT SETCELLSIZE,GRID1,COLUMN,3,80
OBJECT SETCELLSIZE,GRID1,COLUMN,4,60
OBJECT SETCELLSIZE,GRID1,COLUMN,5,80
OBJECT SETCELLSIZE,GRID1,COLUMN,6,80
OBJECT SETCELLSIZE,GRID1,COLUMN,7,80
OBJECT SETCELLSIZE,GRID1,COLUMN,8,80
OBJECT SETCELLSIZE,GRID1,COLUMN,9,80
OBJECT SETCELLSIZE,GRID1,COLUMN,10,80
OBJECT SETCELLSIZE,GRID1,COLUMN,11,80
DB QUERY,"SELECT QuoteNo, RDate, Business, BusType, PostCode, BuildSI, ContSI, StockSI, Gross, IPT, Net, OnCoverYN FROM NU ;"
DB FETCHROW
IF @OK()
%A = 1
REPEAT
%%Query = @DB(GET,QuoteNo)|@DB(GET,RDate)|@DB(GET,Business)|@DB(GET,BusType)|@DB(GET,PostCode)|@DB(GET,BuildSI)|@DB(GET,ContSI)|@DB(GET,StockSI)|@DB(GET,Gross)|@DB(GET,IPT)|@DB(GET,Net)|@DB(Get,OnCoverYN)
PARSE "%1;",%%Query
REM LIST ADD,6,%1
OBJECT SETCELL,GRID1,ROW,%A,%%Query
%A = @SUCC(%A)
DB FETCHROW
UNTIL @NOT(@OK())@EQUAL(%A,200)
IF @EQUAL(%A,200)
INFO You have over 200 quotes in the database!
END
END |
_________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
Back to top |
|
|
arcray Valued Contributor
Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Thu Jan 09, 2003 6:44 am Post subject: |
|
|
I have tried the COLLIST component of the VDSLISTS.DLL addon, but I can't work out how to scroll up and down and along the list created.
It does seem to display more than 50 records, if only I could get to them! But I do like the ability to sort...
Revised code snippet:-
Code: | :GetBUTTON
LIST CREATE,6
DIALOG SHOW,LISTSGROUP
EXTLIST WINDOW,#FLUSTER
EXTLIST ADD,COLLIST,COLLIST1,0,0,800,600,QuoteNo|40@CR()Renewal Date|60@CR()Business|120@CR()BusinessType|80@CR()PostCode|80@CR()BuildingsSI|80@CR()ContentsSI|80@CR()StockSI|80@CR()Gross|80@CR()IPT|80@CR()Net|80@CR()OnCoverYN|60,DBLCLICK
DB QUERY,"SELECT QuoteNo, RDate, Business, BusType, PostCode, BuildSI, ContSI, StockSI, Gross, IPT, Net, OnCoverYN FROM NU ;"
DB FETCHROW
IF @OK()
%A = 1
REPEAT
%%Query = @DB(GET,QuoteNo)@TAB()@DB(GET,RDate)@TAB()@DB(GET,Business)@TAB()@DB(GET,BusType)@TAB()@DB(GET,PostCode)@TAB()@DB(GET,BuildSI)@TAB()@DB(GET,ContSI)@TAB()@DB(GET,StockSI)@TAB()@DB(GET,Gross)@TAB()@DB(GET,IPT)@TAB()@DB(GET,Net)@TAB()@DB(Get,OnCoverYN)
PARSE "%1;",%%Query
LIST ADD,6,%1
EXTLIST LIST,ADD,COLLIST1,%%Query
%A = @SUCC(%A)
DB FETCHROW
UNTIL @NOT(@OK())@EQUAL(%A,200)
IF @EQUAL(%A,200)
INFO You have over 200 quotes in the database!
END
END
LIST ADD,6,Last Record!
EXTLIST LIST,SORT,COLLIST1
EXTLIST LIST,SAVEFILE,COLLIST1,%%Drive1\grid1.fls |
_________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
Back to top |
|
|
X-Tools Valued Contributor
Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Thu Jan 09, 2003 3:53 pm Post subject: Error |
|
|
Hi,
I had such a problem some weeks ago.
Tommy told me about an error, when you place the collist
on another control (mostly a group element).
You can solve this if you set the groupname instead of the window handle.
Bye, Fabian |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu Jan 09, 2003 6:59 pm Post subject: |
|
|
Indeed; instead of the class name of the window, use the window identifier of the
group box:
EXTLIST WINDOW,@WINEXISTS(~groupname)
However, I'm not sure if this will work with the VDSOBJ DLL. |
|
Back to top |
|
|
arcray Valued Contributor
Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri Jan 10, 2003 5:18 am Post subject: |
|
|
Tommy wrote: | Indeed; instead of the class name of the window, use the window identifier of the
group box:
EXTLIST WINDOW,@WINEXISTS(~groupname)
However, I'm not sure if this will work with the VDSOBJ DLL. |
Thanks Tommy! It all now works as it should. (~GROUPNAME) threw me for a while as I had not come across this before, nor could I find it anywhere in the documentation. _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Fri Jan 10, 2003 5:37 pm Post subject: |
|
|
For VDSOBJ:
You might want to check the database and see if any illegal formating characters (such as line ends) are within the database. I tried a very simple database of 300x300 and it worked. The grid however is limited to the amount of memory on your computer. Here is some code I used to build a very quick database of 300x300, you can then use the LOADFILE command to load the test.txt database.
Code: |
list create,1
list add,1,600","600
%A = 0
%B = 0
repeat
repeat
list add,1,%A","%B","test
%A = @succ(%A)
until @equal(%A,301)
%A = 0
%B = @succ(%B)
until @equal(%B,301)
list savefile,1,test.txt
|
You can then use the OBJECT LOADFILE,GRID1,test.txt command to load the file into the database. Again there might be an illegal character within your database or the memory limit on the computer could be the issue. |
|
Back to top |
|
|
arcray Valued Contributor
Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Tue Jan 14, 2003 8:11 am Post subject: 49 Rows |
|
|
I have experimented with a variety of different systems (from 128MB to 4GB of memory) and different sites and different datasets.
It seems consistent that the 51st record does not get displayed in a GRID control.
Does VDSOBJ2 resolve this? _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Tue Jan 14, 2003 5:34 pm Post subject: |
|
|
The code I posted above works for me and goes well beyond 51 fields for both columns and rows. I've tried this on a Win XP machine (300+ mb Ram) and a Win 98 SE machine (128 mb Ram). Try running the code above and see if it works. I honestly think theres an illegal formatting character somewhere in your database thats causing the grid to stop on that 51st field. |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Tue Jan 14, 2003 7:43 pm Post subject: |
|
|
Works fine on my machine...Windows 98 ie5 500 mhz 64 mb ram
Tested by replacing the old vdsobj.dll with vdsobj02.dll in a map creation program I made previously....able to make a 1000x1000 grid easily.
NodNarb |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|