Application Development and Automation 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: 
Read only

Making row non-editable in table control

Former Member
0 Likes
1,988

Hello Friends,

I have a requirement that I want to make a row(not column) non-editable in table control.

I want that some rows should be editable and some should not be editable. How can I achieve that?

<REMOVED BY MODERATOR>

Best Regards,

Navin

Edited by: Alvaro Tejada Galindo on Feb 26, 2008 10:01 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
858

hi,

first assign group to all the elements which u want disable .

You can set this through attributes...

now make one module in PBO...


MODULE init_screen OUTPUT.

LOOP AT SCREEN.
IF screen-group1 = 111 .
screen-input = 0.
MODIFY SCREEN.
ELSEIF screen-group1 111.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.


ENDMODULE. " init_screen OUTPUT

or


if it_vbak-vbeln eq '0000000001'.

loop at screen.

if screen-group1 = 'G1'.

screen-input = '0'.
screen-output = '1'.

modify screen.

endif.

endloop.

endif.

Cheers,

Chandru

hi,

first assign group to all the elements which u want disable .

You can set this through attributes...

now make one module in PBO...


MODULE init_screen OUTPUT.

LOOP AT SCREEN.
IF screen-group1 = 111 .
screen-input = 0.
MODIFY SCREEN.
ELSEIF screen-group1 111.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.


ENDMODULE. " init_screen OUTPUT

or


if it_vbak-vbeln eq '0000000001'.

loop at screen.

if screen-group1 = 'G1'.

screen-input = '0'.
screen-output = '1'.

modify screen.

endif.

endloop.

endif.

Cheers,

Chandru

4 REPLIES 4
Read only

Former Member
0 Likes
859

hi,

first assign group to all the elements which u want disable .

You can set this through attributes...

now make one module in PBO...


MODULE init_screen OUTPUT.

LOOP AT SCREEN.
IF screen-group1 = 111 .
screen-input = 0.
MODIFY SCREEN.
ELSEIF screen-group1 111.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.


ENDMODULE. " init_screen OUTPUT

or


if it_vbak-vbeln eq '0000000001'.

loop at screen.

if screen-group1 = 'G1'.

screen-input = '0'.
screen-output = '1'.

modify screen.

endif.

endloop.

endif.

Cheers,

Chandru

Read only

0 Likes
858

Hello Chandra,

Thanks a lot. But this option will not work for making the rows to be non-editable.

Regards,

Navin

Read only

Former Member
0 Likes
858

Even check this explaination

Inside the value node(which is bound to your table), create a value attribute of type 'boolean, say 'RowReadonly'

Bind this 'RowReadonly' to 'readonly' property of all celleditors of your table's all columns.

Then if you want to make the i-th row of you table read only, give

wdContext.node<YourTablesValueNode>().get<YourTablesValueNode>elementAt(i).setRowReadonly(true);

for all other rows, for which,are not to be readonly

wdContext.node<YourTablesValueNode>().get<YourTablesValueNode>elementAt(i).setRowReadonly(false);

Refer to this thread also :

Cheers,

Chandru

Read only

0 Likes
858

Thanks Chandra,

Its done. Your points have been added.

Regards,

Navin