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.
amichalec Absent Member.
Absent Member.
4589 views

Grid control data entry.

Is there a way to force the grid control to be in data entry mode.

What I'm trying to do is have the user enter data in one cell then go to next cell and enter data then the next etc.

so basically being able to do data entry directly in the grid.

 

Thanks

Alan

0 Likes
9 Replies
Micro Focus Expert
Micro Focus Expert

RE: Grid control data entry.

Take a lok at the sample gridctl.cbl, compile and execute, place focus in one of the grid cells, you can change the data, use the tab key to get to the next cell, and change the data there.

0 Likes
amichalec Absent Member.
Absent Member.

RE: Grid control data entry.

Thanks for your help....Close to what i need...

Is it possible to have the enter key act like the tab key within the grid? ie if the user hits the enter key instead of tab i want  both of the to act the same.

0 Likes
buggabill Absent Member.
Absent Member.

RE: Grid control data entry.

It looks like you should be able to inquire FINISH-REASON on the grid on either the MSG-CANCEL-ENTRY or MSG-FINISH-ENTRY events.  The value returned is a signed integer, and in acugui.def, there is a value - GRFR-ENTER-KEY - that indicates that the enter key was hit.  You can move focus to the next cell then.

0 Likes
amichalec Absent Member.
Absent Member.

RE: Grid control data entry.

also  i want to be able to skip over certain cells. i.e. enter data in cell 1, 2,3 skip over 4 enter in cell 5,6 skip the rest of the row and go to next  row skipping to cell 5,6 skip next row enter in cell 5, 6 etc....is this possible.

0 Likes
amichalec Absent Member.
Absent Member.

RE: Grid control data entry.

Here are some screen shots of what I'm attempting to accomplish

0 Likes
amichalec Absent Member.
Absent Member.

RE: Grid control data entry.

Screen shot 2

 

0 Likes
amichalec Absent Member.
Absent Member.

RE: Grid control data entry.

Screen shot 3

0 Likes
Micro Focus Expert
Micro Focus Expert

RE: Grid control data entry.

Not sure if you are using AcuBench, when you design the grid, you can set cell settigs, and within that dialog, you can set a cell to be protected (meaning it cannot be entered)

0 Likes
neidingd Honored Contributor.
Honored Contributor.

RE: Grid control data entry.

here is an example from a programm we use to place the cursor in a grid after enter some data:

     ***********************************************************

      move-cursor section.

          inquire pos-grid, last-row = lrow,

                  pos-grid, cursor-y = i-row,

                  pos-grid, cursor-x = i-col.

          evaluate event-data-1

             when 15

                  inquire pos-grid(event-data-2, 15),

                                   cell-data = i-term

                  evaluate i-term(3:1)

                     when "."

                          move 16 to i-col

                     when other

                          compute i-row = i-row + 1 end-compute

                          if      i-row > lrow

                             move lrow to i-row

                          end-if

                  end-evaluate

             when 16

                  compute i-row = i-row + 1 end-compute

                  move    15 to   i-col

                  if      i-row > lrow

                     move lrow to i-row

                  end-if

             when 17

                  compute i-row = i-row + 1 end-compute

                  move    15 to   i-col

                  if      i-row > lrow

                     move lrow to i-row

                  end-if

          end-evaluate.

          modify pos-grid, cursor-y = i-row,

                           cursor-x = i-col.

      move-cursor-ende.

          exit.

      move-cursor-e.

     ***********************************************************

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.