02-26-2008 2:57 PM
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
02-26-2008 3:04 PM
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
02-26-2008 3:04 PM
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
02-26-2008 3:19 PM
Hello Chandra,
Thanks a lot. But this option will not work for making the rows to be non-editable.
Regards,
Navin
02-26-2008 3:05 PM
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
02-26-2008 4:41 PM
Thanks Chandra,
Its done. Your points have been added.
Regards,
Navin