General Discussions
GridList

Hello,

Does anyone have a working example of a basic page using a gridlist function?

The example in the help documentation does not work when copy and pasted into my code, and I have been the extra things to get it working but in the end the Gridlist is not pulling the example list of Data[#][#] or Title[#] information past the first inputs.

Is there something I am missing?

63594fd793e68
63594fd80a033

Hello, Does anyone have a working example of a basic page using a gridlist function? The example in the help documentation does not work when copy and pasted into my code, and I have been the extra things to get it working but in the end the Gridlist is not pulling the example list of Data[#][#] or Title[#] information past the first inputs. Is there something I am missing? ![63594fd793e68](serve/attachment&path=63594fd793e68) ![63594fd80a033](serve/attachment&path=63594fd80a033)

Sure, I have been adjusting things to see what I can get to work but it's still doing the same thing.

{======== SSH Communication Summary ============}
{ This page is an overview of the sites with comm }
{ alarms triggerd but seperated into their channels }
{===================================================}

[
Title = "rzr_Channel_Alarms";
WinFlag = 0;
Color = "<FF292929>";
PageHeight = 900;
PageWidth = 900;

GridFont;

Header;
Data;
DataForm;

Constant #Name             = 0;
Constant #Area            = 1;
Constant #Description    = 2;
Constant #IODev            = 3;
Constant #Address        = 4;

PageX;
PageY;
PageMinWidth;
PageMinHeight;
PageVWidth;
PageVHeight;
PageMaintainAspectRatio = 1;
NoStretch = 1;

]

Main
[

            GridFont  = Scope(\VTSDB, "MeterFont")\Value;

            Header[#Name]         = "This Name";
            Header[#Area]         = "Some Area";
            Header[#Description] = "A little Description";
            Header[#IODev]         = "I/O Controller Dev";
            Header[#Address]     = "Address 12345";

            Data[0][0] = "Tag1";
            Data[1][0] = "Tag2";
            Data[2][0] = "Tag3";
            Data[0][1] = "Area1";
            Data[1][1] = "Area1";
            Data[2][2] = "I'm a tag";
            Data[1][3] = "PollDrvr1";
            Data[0][4] = "40001";

            DataForm = "%s";


GUITransform(184, 781, 805, 217   { Reference rectangle         },
           1                    { Scale Left                  },
           1                    { Scale Bottom                },
           1                    { Scale Right                 },
           1                    { Scale Top                   },
           1                    { No overall scaling          },
           0, 0, 1, 0           { No movement; visible; res   },
           0, 0, 0                 { Not selectable              },
         \System\GridList(Header     { Column Header Array             },
                          Data       { Data Array                      },
                          Dataform     { Format for Text                 },
                          122        { Column widths array           },
                          3         { # Data rows                   },
                          5         { # Data cols                   },
                          15, 94      { Grid BGnd, Grid color         },
                          2, 1         { Grid line width, line style    },
                          20, 50     { Row/Title height              },
                          0, 0         { Horiz/Vert cell padding         },
                          0, 0         { Horiz/Vert Scroll position     },
                          1, 1         { Disable V/H scroll bars         },
                          1            { Disable column sizing           },
                          1            { Disable Sorting                 },
                          1            { Disable selected cell           },
                          0, 0         { Enable V/H grid lines          },
                          1            { LockFirstColumn                 },
                          Invalid      { Sort                            },
                          0          { SelectedRow                     },
                          0            { SelectedColumn                  },
                          GridFont    { GridFontParm                    },
                          0            { GetSortKeyScope                },
                          1            { EnabelBorderParm                },
                          140        { CellTextColorParm                },
                          71        { TitleTextColorParm            },
                          166        { TitleBackColorParm            },
                          174        { TitleGridColorParm            },
                          0            { LockFirstColColorParm            },
                          0            { CaseSortParm                    },
                          0            { DisableControlsParm            },
                          0            { IsFocuableParm                }                            
                        )
        );




]
Sure, I have been adjusting things to see what I can get to work but it&#039;s still doing the same thing. {======== SSH Communication Summary ============} { This page is an overview of the sites with comm } { alarms triggerd but seperated into their channels } {===================================================} [ Title = &quot;rzr_Channel_Alarms&quot;; WinFlag = 0; Color = &quot;&lt;FF292929&gt;&quot;; PageHeight = 900; PageWidth = 900; GridFont; Header; Data; DataForm; Constant #Name = 0; Constant #Area = 1; Constant #Description = 2; Constant #IODev = 3; Constant #Address = 4; PageX; PageY; PageMinWidth; PageMinHeight; PageVWidth; PageVHeight; PageMaintainAspectRatio = 1; NoStretch = 1; ] Main [ GridFont = Scope(\VTSDB, &quot;MeterFont&quot;)\Value; Header[#Name] = &quot;This Name&quot;; Header[#Area] = &quot;Some Area&quot;; Header[#Description] = &quot;A little Description&quot;; Header[#IODev] = &quot;I/O Controller Dev&quot;; Header[#Address] = &quot;Address 12345&quot;; Data[0][0] = &quot;Tag1&quot;; Data[1][0] = &quot;Tag2&quot;; Data[2][0] = &quot;Tag3&quot;; Data[0][1] = &quot;Area1&quot;; Data[1][1] = &quot;Area1&quot;; Data[2][2] = &quot;I&#039;m a tag&quot;; Data[1][3] = &quot;PollDrvr1&quot;; Data[0][4] = &quot;40001&quot;; DataForm = &quot;%s&quot;; GUITransform(184, 781, 805, 217 { Reference rectangle }, 1 { Scale Left }, 1 { Scale Bottom }, 1 { Scale Right }, 1 { Scale Top }, 1 { No overall scaling }, 0, 0, 1, 0 { No movement; visible; res }, 0, 0, 0 { Not selectable }, \System\GridList(Header { Column Header Array }, Data { Data Array }, Dataform { Format for Text }, 122 { Column widths array }, 3 { # Data rows }, 5 { # Data cols }, 15, 94 { Grid BGnd, Grid color }, 2, 1 { Grid line width, line style }, 20, 50 { Row/Title height }, 0, 0 { Horiz/Vert cell padding }, 0, 0 { Horiz/Vert Scroll position }, 1, 1 { Disable V/H scroll bars }, 1 { Disable column sizing }, 1 { Disable Sorting }, 1 { Disable selected cell }, 0, 0 { Enable V/H grid lines }, 1 { LockFirstColumn }, Invalid { Sort }, 0 { SelectedRow }, 0 { SelectedColumn }, GridFont { GridFontParm }, 0 { GetSortKeyScope }, 1 { EnabelBorderParm }, 140 { CellTextColorParm }, 71 { TitleTextColorParm }, 166 { TitleBackColorParm }, 174 { TitleGridColorParm }, 0 { LockFirstColColorParm }, 0 { CaseSortParm }, 0 { DisableControlsParm }, 0 { IsFocuableParm } ) ); ]

Give this a try.

{======== SSH Communication Summary ============}
{ This page is an overview of the sites with comm }
{ alarms triggerd but seperated into their channels }
{===================================================}

[
Title = "rzr_Channel_Alarms2";
WinFlag = 0;
Color = "<FF292929>";
PageHeight = 900;
PageWidth = 900;

GridFont;

Header;
Data;
DataForm;

Constant #Name             = 0;
Constant #Area            = 1;
Constant #Description    = 2;
Constant #IODev            = 3;
Constant #Address        = 4;

PageX;
PageY;
PageMinWidth;
PageMinHeight;
PageVWidth;
PageVHeight;
PageMaintainAspectRatio = 1;
NoStretch = 1;
]
Init [
  If 1 Main;
[
            Header = New(5);
            Data   = New(20,5);
            GridFont  = Scope(\VTSDB, "MeterFont")\Value;

            Header[#Name]         = "This Name";
            Header[#Area]         = "Some Area";
            Header[#Description] = "A little Description";
            Header[#IODev]         = "I/O Controller Dev";
            Header[#Address]     = "Address 12345";

            Data[0][0] = "Tag1";
            Data[1][0] = "Tag2";
            Data[2][0] = "Tag3";
            Data[0][1] = "Area1";
            Data[1][1] = "Area1";
            Data[2][2] = "I'm a tag";
            Data[1][3] = "PollDrvr1";
            Data[0][4] = "40001";

            DataForm = "%s";
  ]
]
Main [

GUITransform(184, 781, 805, 217   { Reference rectangle         },
           1                    { Scale Left                  },
           1                    { Scale Bottom                },
           1                    { Scale Right                 },
           1                    { Scale Top                   },
           1                    { No overall scaling          },
           0, 0, 1, 0           { No movement; visible; res   },
           0, 0, 0                 { Not selectable              },
         \System\GridList(Header     { Column Header Array             },
                          Data       { Data Array                      },
                          Dataform     { Format for Text                 },
                          122        { Column widths array           },
                          3         { # Data rows                   },
                          5         { # Data cols                   },
                          15, 94      { Grid BGnd, Grid color         },
                          2, 1         { Grid line width, line style    },
                          20, 50     { Row/Title height              },
                          0, 0         { Horiz/Vert cell padding         },
                          0, 0         { Horiz/Vert Scroll position     },
                          1, 1         { Disable V/H scroll bars         },
                          1            { Disable column sizing           },
                          1            { Disable Sorting                 },
                          1            { Disable selected cell           },
                          0, 0         { Enable V/H grid lines          },
                          1            { LockFirstColumn                 },
                          Invalid      { Sort                            },
                          0          { SelectedRow                     },
                          0            { SelectedColumn                  },
                          GridFont    { GridFontParm                    },
                          0            { GetSortKeyScope                },
                          1            { EnabelBorderParm                },
                          140        { CellTextColorParm                },
                          71        { TitleTextColorParm            },
                          166        { TitleBackColorParm            },
                          174        { TitleGridColorParm            },
                          0            { LockFirstColColorParm            },
                          0            { CaseSortParm                    },
                          0            { DisableControlsParm            },
                          0            { IsFocuableParm                }                            
                        )
        );




]
Give this a try. ```` {======== SSH Communication Summary ============} { This page is an overview of the sites with comm } { alarms triggerd but seperated into their channels } {===================================================} [ Title = &quot;rzr_Channel_Alarms2&quot;; WinFlag = 0; Color = &quot;&lt;FF292929&gt;&quot;; PageHeight = 900; PageWidth = 900; GridFont; Header; Data; DataForm; Constant #Name = 0; Constant #Area = 1; Constant #Description = 2; Constant #IODev = 3; Constant #Address = 4; PageX; PageY; PageMinWidth; PageMinHeight; PageVWidth; PageVHeight; PageMaintainAspectRatio = 1; NoStretch = 1; ] Init [ If 1 Main; [ Header = New(5); Data = New(20,5); GridFont = Scope(\VTSDB, &quot;MeterFont&quot;)\Value; Header[#Name] = &quot;This Name&quot;; Header[#Area] = &quot;Some Area&quot;; Header[#Description] = &quot;A little Description&quot;; Header[#IODev] = &quot;I/O Controller Dev&quot;; Header[#Address] = &quot;Address 12345&quot;; Data[0][0] = &quot;Tag1&quot;; Data[1][0] = &quot;Tag2&quot;; Data[2][0] = &quot;Tag3&quot;; Data[0][1] = &quot;Area1&quot;; Data[1][1] = &quot;Area1&quot;; Data[2][2] = &quot;I&#039;m a tag&quot;; Data[1][3] = &quot;PollDrvr1&quot;; Data[0][4] = &quot;40001&quot;; DataForm = &quot;%s&quot;; ] ] Main [ GUITransform(184, 781, 805, 217 { Reference rectangle }, 1 { Scale Left }, 1 { Scale Bottom }, 1 { Scale Right }, 1 { Scale Top }, 1 { No overall scaling }, 0, 0, 1, 0 { No movement; visible; res }, 0, 0, 0 { Not selectable }, \System\GridList(Header { Column Header Array }, Data { Data Array }, Dataform { Format for Text }, 122 { Column widths array }, 3 { # Data rows }, 5 { # Data cols }, 15, 94 { Grid BGnd, Grid color }, 2, 1 { Grid line width, line style }, 20, 50 { Row/Title height }, 0, 0 { Horiz/Vert cell padding }, 0, 0 { Horiz/Vert Scroll position }, 1, 1 { Disable V/H scroll bars }, 1 { Disable column sizing }, 1 { Disable Sorting }, 1 { Disable selected cell }, 0, 0 { Enable V/H grid lines }, 1 { LockFirstColumn }, Invalid { Sort }, 0 { SelectedRow }, 0 { SelectedColumn }, GridFont { GridFontParm }, 0 { GetSortKeyScope }, 1 { EnabelBorderParm }, 140 { CellTextColorParm }, 71 { TitleTextColorParm }, 166 { TitleBackColorParm }, 174 { TitleGridColorParm }, 0 { LockFirstColColorParm }, 0 { CaseSortParm }, 0 { DisableControlsParm }, 0 { IsFocuableParm } ) ); ] ````

Hello crd,

The code you sent is working. I would not have known from the Gridlist example it was needed to separate the array points into their own module. Thanks for the help, it's very appreciated!

Hello crd, The code you sent is working. I would not have known from the Gridlist example it was needed to separate the array points into their own module. Thanks for the help, it&#039;s very appreciated!

I should add that there is a widget you can use for this. The simple way to use the widget is to make each row of the grid it's own widget for a tag type.

I should add that there is a widget you can use for this. The simple way to use the widget is to make each row of the grid it&#039;s own widget for a tag type.

Trihedral Engineering Ltd.

edited Jul 27 '23 at 2:53 pm
162
6
4
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft