Skip to main content

Grid control data entry.

  • July 27, 2012
  • 13 replies
  • 0 views

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

13 replies

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • July 27, 2012

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

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.


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

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.


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

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.


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

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.


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

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.


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

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.


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

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


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

Screen shot 2

 


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

Screen shot 2

 


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

Screen shot 3


  • Author
  • Rocketeer
  • 19312 replies
  • July 27, 2012

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

Screen shot 3


Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • July 27, 2012

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

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)


  • Author
  • Rocketeer
  • 19312 replies
  • July 30, 2012

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

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.

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