PxPlus User Forum

Main Board => Discussions => Nomads => Topic started by: Bernie Perlman on January 21, 2020, 08:02:24 PM

Title: Grids
Post by: Bernie Perlman on January 21, 2020, 08:02:24 PM
I am new to using grids on Nomads.  How do you define the number of columns in  a grid?  I must be missing something simple?
Title: Re: Grids
Post by: Thomas Bock on January 22, 2020, 01:54:22 AM
There are 3 ways to define the number of columns.

Title: Re: Grids
Post by: Devon Austen on January 22, 2020, 08:03:20 AM
You can use the Grid Format screen accessed using the Format button found in the Grid properties under both attributes and presets.

It allows you to define your columns and format them.
Title: Re: Grids
Post by: Bernie Perlman on January 22, 2020, 03:37:25 PM
Thank you for your replies but I must be missing something very basic. I have used your suggestions and read the documentation but the grid remains as initially defined in the DISPLAY window.  I am trying to define a simple spreadsheet with columns 'Quantity', 'Price' and 'Total', each with a width of 16.  If I could ask for a few minutes of someone's time, please send me screenshots of the DISPLAY, FORMAT and PRESETS windows.  I am using PxPlus 2019. If this cannot be done through the Forum, please send to my email: bernperl3@gmail.com.
Title: Re: Grids
Post by: Peter.Higgins on January 31, 2020, 01:17:55 PM
Bernie,
Helpful hints:

The fmt$ control property allows you to set the columns format from post display.  Instructions under grid control
Much easier to maintain or make dynamic, especially remotely.

Set properties using the propbag or Pseudo Multi-Properties control properties
(grd'row.colno.value.$="1,1,""Action"","
This reduces your response time tremendously. 

Please do not torment yourself trying to deal with cell data.  All I/O is best done by row, same as reading a record.   
Loading is much faster by entire grid.  Faster to set colors etc after the Data load than mixed in by row.

Control Property LoadIOList$ allows you to get the grids Iolist
gridIOL$=grd'LoadIOList$

Control Property rowdata$ allows you to get the data in or out. 
Get: READ DATA FROM grd'rowdata$,SEP=gFDlm$ TO IOL=gridIOL$,ERR=*NEXT
Put: grd'rowdata$=REC(gridIOL$,SEP=gFDlm$)

Control Property Currentrow is not row, they are unrelated. 
The first is for focus position, the second is for update position.  Focus doesn't change update position.
Ditto with column. 

Nomads has generic variables for controls including grids (See Object Nomads)
This makes generic code much easier. 
id.row for row.
id for current control object.
id$  for current control name.
Title: Re: Grids
Post by: PMM_CAI on March 11, 2020, 04:15:56 PM
Hi Bernie. Just checking: when you say "the grid remains as initially defined in the DISPLAY window," do you mean the Designer window? Because the columns don't render until you process the panel.

Paula McKeever
CAI Software