Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
aw_muench Respected Contributor.
Respected Contributor.
3287 views

Grid with headers and cols-spanned

Jump to solution

Hi,

we need a grid with 2 lines of col-headings (no problem with NUM-COL-HEADINGS) but the cells of the first line should span over 3 cols of the second and all other lines of the grid.

Is this possible ? If so, please tell us how.

If not, how would you solve this problem ?

0 Likes
1 Solution

Accepted Solutions
neidingd Honored Contributor.
Honored Contributor.

RE: Grid with headers and cols-spanned

Jump to solution

Hey,

my example can be done to break a column.

                   display-columns    (
                                         1,  11,  18,  28,  65,  78,
                                        82,  90,  94, 107, 116, 125,
                                       134, 143, 152,   1,  11,  94,
                                       107, 116, 125, 134, 143, 152,
                                       163, 176, 187, 191
                                      )

Your Example can't be handled with a grid alone.

 

In the past i used 2 ways to get somethin like this realized.


2 grids - one only the first Header line

with Labels

               05  label "LJ", col  52,2, size 31,4, lines 1,2,
                   color 303, center, font bbig-font.

               05  label "VJ", col  83,6, size 28,8, lines 1,2,
                   color 303, center, font bbig-font.

 

The 2 grid solution was my first way to handle it. I think with Labels it is the better way to handle the problem.

              

View solution in original post

0 Likes
7 Replies
neidingd Honored Contributor.
Honored Contributor.

RE: Grid with headers and cols-spanned

Jump to solution

something like this?

0 Likes
aw_muench Respected Contributor.
Respected Contributor.

RE: Grid with headers and cols-spanned

Jump to solution

Hi,

that looks quite interesting even if it's not the solution to my current problem. How did you do it ?

Perhaps your solution can manage a grid like this ?

      |     Blue         |     Red          |    White         |
      |Stock|Orders|Avail|Stock|Orders|Avail|Stock|Orders|Avail|
A0001 |    2|     8|   -6|    0|     0|    0|   25|     0|   25|
A0002 |   13|     2|   11|    0|     0|    0|    0|    10|  -10|

 

      

0 Likes
neidingd Honored Contributor.
Honored Contributor.

RE: Grid with headers and cols-spanned

Jump to solution

Hey,

my example can be done to break a column.

                   display-columns    (
                                         1,  11,  18,  28,  65,  78,
                                        82,  90,  94, 107, 116, 125,
                                       134, 143, 152,   1,  11,  94,
                                       107, 116, 125, 134, 143, 152,
                                       163, 176, 187, 191
                                      )

Your Example can't be handled with a grid alone.

 

In the past i used 2 ways to get somethin like this realized.


2 grids - one only the first Header line

with Labels

               05  label "LJ", col  52,2, size 31,4, lines 1,2,
                   color 303, center, font bbig-font.

               05  label "VJ", col  83,6, size 28,8, lines 1,2,
                   color 303, center, font bbig-font.

 

The 2 grid solution was my first way to handle it. I think with Labels it is the better way to handle the problem.

              

View solution in original post

0 Likes
aw_muench Respected Contributor.
Respected Contributor.

RE: Grid with headers and cols-spanned

Jump to solution

Hi,

sorry for the late reply but we had to discuss and test the different options first.

Your solutions are perfect for grids without HSCROLL and with no adjustable columns.

As we have both of these options we had to figure out something new based on your suggestion with the two grids ... and it looks pretty good.

Thanks a lot for your support.

0 Likes
neidingd Honored Contributor.
Honored Contributor.

RE: Grid with headers and cols-spanned

Jump to solution

Then you must use the 2grid Solution.

you can inquire the columns size after resizing and take the new values for the other grid.

same for the Scrolling Position.

inquire the column size give only the value from the current "cell". For adjusting you have to compute the complete grid with all the values... example:

          move 1 to artgrid-col(1).

          perform varying idx from 1 by 1 until idx > 31

             compute idx2 = idx + 1 end-compute

             compute artgrid-col(idx2) =

                     artgrid-col(idx)  +

                     artgrid-pdis(idx)

             end-compute

          end-perform.

          modify data-grid

                 display-columns ( artgrid-col(1)

                                   artgrid-col(2)

                                   artgrid-col(3)

                                   artgrid-col(4)

                                   artgrid-col(5)

                                   artgrid-col(6)

                                   artgrid-col(7)

                                   artgrid-col(8)

                                   artgrid-col(9)

                                   artgrid-col(10)

                                   artgrid-col(11)

                                   artgrid-col(12)

                                   artgrid-col(13)

                                   artgrid-col(14)

                                   artgrid-col(15)

                                   artgrid-col(16)

                                   artgrid-col(17)

                                   artgrid-col(18)

                                   artgrid-col(19)

                                   artgrid-col(20)

                                   artgrid-col(21)

                                   artgrid-col(22)

                                   artgrid-col(23)

                                   artgrid-col(24)

                                   artgrid-col(25)

                                   artgrid-col(26)

                                   artgrid-col(27)

                                   artgrid-col(28)

                                   artgrid-col(29)

                                   artgrid-col(30)

                                   artgrid-col(31)

                                   artgrid-col(32)

                                  ).

0 Likes
aw_muench Respected Contributor.
Respected Contributor.

RE: Grid with headers and cols-spanned

Jump to solution

Thanks for claryfying.

But we had problems with scrolling horizontally because the grid doesn't create any event/exception.

Do you know how to scroll the title grid when the user scrolls the main grid ?

0 Likes
neidingd Honored Contributor.
Honored Contributor.

RE: Grid with headers and cols-spanned

Jump to solution

when the grid doesn't create an Event/exception then the next step for me where to deactivate the grid-scrolling bar and use an own Scrolling-bar.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.