Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Change Position of Table control at runtime depending on user selection

Former Member
0 Kudos

Hi,

I have a requirement wherein i have various table controls on a screen depending o user selection i have to make the table control visible or invisible. I am able to achieve this; however, the user requirement is to change the position of table control on screen dynamically for better display .

Please let me is this achievable ? If yes, then what is the procedure to achieve this.

Thanks

-Aleria

1 ACCEPTED SOLUTION

Former Member
0 Kudos

1) Please post this in the UI programming forum to get better responses.

2)What you can do is call a new screen with the desired layout, cause the user wont be able to drag and reposition it.

4 REPLIES 4

Former Member
0 Kudos

1) Please post this in the UI programming forum to get better responses.

2)What you can do is call a new screen with the desired layout, cause the user wont be able to drag and reposition it.

former_member320332
Contributor
0 Kudos

Hi Aleria,

You can change table control columns dynamically.

Your table control has the structure of CXTAB_CONTOL and it has one field called COLS( structure CXTAB_COLUMN ) which has the fields of the table control. So you can modify this COLS[ ] field of the table control and change column positions dynamically.

Try with below option in PBO of table control . If Table control name TCTRL then

TCTRL-COLS[ ] will have structure SCREEN INDEX SELECTED VISLENGTH INVISIBLE. Screen is a structure containing screen element details. So you can check SCREEN-NAME for field of table control and change its corresponding INDEX i.e. modify this particular record of COLS[ ].

Thanks,

Pawan

0 Kudos

Thanks for your answer Pawan. However, my requirement is not change the position of columns within a table control at runtime but to change the position of whole table control.

In my requirement , there are various table control on a subscreen from which user may view any of them depending on input on selection screen.

My problem is when a table control becomes invisible ( as user doesn't select the checkbox for this on selection screen), it leave a blank space on subscreen. User doesn't want this ; they want the table controls to repositioned dynamically.

Is this achievable in module pool?

-Aleria

0 Kudos

Aleria, If you want to dynamically position the table control, you have have them in subscreens and call them in the subscreen area as need?