Skip to main content

[archive] TAB/GRID help

  • September 2, 2008
  • 6 replies
  • 0 views

[Migrated content. Thread originally posted on 29 August 2008]

$%^&!!!
I have a screen with a tab control at top and a grid control at the bottom - when I switch between tabs the grid records get appended to the bottom of the last displayed grid. - ie- the PRD module inserts a generated "display Screen1" in the generated Acu-Screen1-Ta-1-Cmd-Tabchanged - when the screen is 'displayed' again the grid contents are doubled. The simplicity of the problem but lack of solution is making me very sore! Appreciate any help.

6 replies

[Migrated content. Thread originally posted on 29 August 2008]

$%^&!!!
I have a screen with a tab control at top and a grid control at the bottom - when I switch between tabs the grid records get appended to the bottom of the last displayed grid. - ie- the PRD module inserts a generated "display Screen1" in the generated Acu-Screen1-Ta-1-Cmd-Tabchanged - when the screen is 'displayed' again the grid contents are doubled. The simplicity of the problem but lack of solution is making me very sore! Appreciate any help.
I think you'll need to post your code to get some help. The Acu-Screen1-Ta-1-Cmd-Tabchanged is an optional event so it is unclear what procedure you are processing for it. A grid is filled when you indicate that you want it filled. A redisplay of the screen will not duplicate a grid row. If item is the tab control add data to an array or file that is then read into the grid you have the abitility to have data in a tab and added to the grid but it is unclear that this is the issue you are having. The screen itself has a before procedure that can be used to "style" the screen with whatever data you consider appropriate.

[Migrated content. Thread originally posted on 29 August 2008]

$%^&!!!
I have a screen with a tab control at top and a grid control at the bottom - when I switch between tabs the grid records get appended to the bottom of the last displayed grid. - ie- the PRD module inserts a generated "display Screen1" in the generated Acu-Screen1-Ta-1-Cmd-Tabchanged - when the screen is 'displayed' again the grid contents are doubled. The simplicity of the problem but lack of solution is making me very sore! Appreciate any help.
Acu-Screen1-Ta-1-Cmd-Tabchanged.
EVALUATE Event-Type
WHEN Cmd-Tabchanged
MOVE Event-Data-1 TO Screen1-Ta-1-Value
MOVE 0 TO Screen1-Pg-1-Visible, Screen1-Pg-2-Visible,
Screen1-Pg-3-Visible
EVALUATE Event-Data-1
WHEN 1
MOVE 1 TO Screen1-Pg-1-Visible
WHEN 2
MOVE 1 TO Screen1-Pg-2-Visible
WHEN 3
MOVE 1 TO Screen1-Pg-3-Visible
END-EVALUATE
PERFORM Screen1-Ta-1-Bef-Tabchg-Display
DISPLAY Screen1
PERFORM Screen1-Ta-1-Aft-Tabchg-Display
END-EVALUATE


If my grid record is not initialize prior to the generated code above DISPLAY Screen1 being executed, the last record of the grid is appended again to the grid each time a tab is changed as the grid record is part of Screen1 record in the generated SCR module.

[Migrated content. Thread originally posted on 29 August 2008]

$%^&!!!
I have a screen with a tab control at top and a grid control at the bottom - when I switch between tabs the grid records get appended to the bottom of the last displayed grid. - ie- the PRD module inserts a generated "display Screen1" in the generated Acu-Screen1-Ta-1-Cmd-Tabchanged - when the screen is 'displayed' again the grid contents are doubled. The simplicity of the problem but lack of solution is making me very sore! Appreciate any help.
Acu-Screen1-Ta-1-Cmd-Tabchanged.
EVALUATE Event-Type
WHEN Cmd-Tabchanged
MOVE Event-Data-1 TO Screen1-Ta-1-Value
MOVE 0 TO Screen1-Pg-1-Visible, Screen1-Pg-2-Visible,
Screen1-Pg-3-Visible
EVALUATE Event-Data-1
WHEN 1
MOVE 1 TO Screen1-Pg-1-Visible
WHEN 2
MOVE 1 TO Screen1-Pg-2-Visible
WHEN 3
MOVE 1 TO Screen1-Pg-3-Visible
END-EVALUATE
PERFORM Screen1-Ta-1-Bef-Tabchg-Display
DISPLAY Screen1
PERFORM Screen1-Ta-1-Aft-Tabchg-Display
END-EVALUATE


If my grid record is not initialize prior to the generated code above DISPLAY Screen1 being executed, the last record of the grid is appended again to the grid each time a tab is changed as the grid record is part of Screen1 record in the generated SCR module.

[Migrated content. Thread originally posted on 29 August 2008]

$%^&!!!
I have a screen with a tab control at top and a grid control at the bottom - when I switch between tabs the grid records get appended to the bottom of the last displayed grid. - ie- the PRD module inserts a generated "display Screen1" in the generated Acu-Screen1-Ta-1-Cmd-Tabchanged - when the screen is 'displayed' again the grid contents are doubled. The simplicity of the problem but lack of solution is making me very sore! Appreciate any help.
Acu-Screen1-Ta-1-Cmd-Tabchanged.
EVALUATE Event-Type
WHEN Cmd-Tabchanged
MOVE Event-Data-1 TO Screen1-Ta-1-Value
MOVE 0 TO Screen1-Pg-1-Visible, Screen1-Pg-2-Visible,
Screen1-Pg-3-Visible
EVALUATE Event-Data-1
WHEN 1
MOVE 1 TO Screen1-Pg-1-Visible
WHEN 2
MOVE 1 TO Screen1-Pg-2-Visible
WHEN 3
MOVE 1 TO Screen1-Pg-3-Visible
END-EVALUATE
PERFORM Screen1-Ta-1-Bef-Tabchg-Display
DISPLAY Screen1
PERFORM Screen1-Ta-1-Aft-Tabchg-Display
END-EVALUATE


If my grid record is not initialize prior to the generated code above DISPLAY Screen1 being executed, the last record of the grid is appended again to the grid each time a tab is changed as the grid record is part of Screen1 record in the generated SCR module.

[Migrated content. Thread originally posted on 29 August 2008]

$%^&!!!
I have a screen with a tab control at top and a grid control at the bottom - when I switch between tabs the grid records get appended to the bottom of the last displayed grid. - ie- the PRD module inserts a generated "display Screen1" in the generated Acu-Screen1-Ta-1-Cmd-Tabchanged - when the screen is 'displayed' again the grid contents are doubled. The simplicity of the problem but lack of solution is making me very sore! Appreciate any help.
see attached

[Migrated content. Thread originally posted on 29 August 2008]

$%^&!!!
I have a screen with a tab control at top and a grid control at the bottom - when I switch between tabs the grid records get appended to the bottom of the last displayed grid. - ie- the PRD module inserts a generated "display Screen1" in the generated Acu-Screen1-Ta-1-Cmd-Tabchanged - when the screen is 'displayed' again the grid contents are doubled. The simplicity of the problem but lack of solution is making me very sore! Appreciate any help.
I've run into similar issues. What I've found is that after adding a grid record, you need to clear or set the grid record to spaces. This has resolved this behaviour for me.