Skip to Content
0
Former Member
Mar 25, 2009 at 12:00 PM

table control disable a column

28 Views

Hi Guys ,

I have a table control with 4 columns

2 fields and 2 buttons.

I would like when the varible X1 = 1 the column with button 1 , it was enabled and column with button 2 disabled.

When the variable X1 = 0 the column with button 1 , it was disabled and column with button 2 enabled.

My code is in pBO.

IF X1 = 1.
 LOOP AT MYCONTROL-COLS INTO COL.
      IF COL-INDEX = 4 .                         "BUTTON 2 INVISIBLE
        COL-SCREEN-INVISIBLE = 1.
        cOL-SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
ELSE.
LOOP AT MYCONTROL-COLS INTO COL.
      IF COL-INDEX = 3 .                          "BUTTON 1 INVISIBLE
        COL-SCREEN-INVISIBLE = 1.
        cOL-SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
ENDIF.

When I execute de table control I can see 4 columns 1 of them empty. I would like to see only 3 columns.

Is it possible?

Thanks a lot.