PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Grids  (Read 1743 times)

Bernie Perlman

  • Member
  • **
  • Posts: 5
    • View Profile
Grids
« 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?

Thomas Bock

  • Diamond Member
  • *****
  • Posts: 177
    • View Profile
Re: Grids
« Reply #1 on: January 22, 2020, 01:54:22 AM »
There are 3 ways to define the number of columns.

  • On the presets tab assign the number of columns to the property "columnswide".
  • On the presets tab just define the column headers. Nomads counts the headers itself.
  • In the program logic do a grid.ctl'columnswide=numberOfRequestedColumns

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: Grids
« Reply #2 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.
Principal Software Engineer for PVX Plus Technologies LTD.

Bernie Perlman

  • Member
  • **
  • Posts: 5
    • View Profile
Re: Grids
« Reply #3 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.

Peter.Higgins

  • Diamond Member
  • *****
  • Posts: 124
    • View Profile
Re: Grids
« Reply #4 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.
« Last Edit: January 31, 2020, 03:08:17 PM by Peter.Higgins »

PMM_CAI

  • Silver Member
  • ***
  • Posts: 27
    • View Profile
Re: Grids
« Reply #5 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