cancel
Showing results for 
Search instead for 
Did you mean: 

How to set table view rows as non editable

Former Member
0 Kudos

Hi,

we are creating service confirmation from service order. I want to make the items copied from the service order to be non editable in the service confirmation.

Could you please help me proceed.

Thanks in advance.

Regards

Shanthi

Accepted Solutions (1)

Accepted Solutions (1)

former_member214667
Contributor
0 Kudos

Hi Shanthi,

Assuming that you mean a table view on web UI and the table view uses tag <chtmlb:configTable> in the htm, you need to set the following attributes:

usage = "RESULTLIST"

allRowsEditable = "FALSE"

Otherwise, please explain your case in a little more details.

Regards,

Shiromani

Former Member
0 Kudos

Hi Shiromani,

Thanks for replying.

Yes, i am using a Table View and i want some rows to be non editable.

i.e The items which are copied from the service order should be non editable.

The html editing which you had specified will make the whole table as non-editable. I need only few rows to be non editable.

Kindly help me to proceed further.

Thanks in advance.

Regards

Shanthi

former_member214667
Contributor
0 Kudos

Hi Shanthi,

If you want to make some rows editable and some as read-only, then the best thing to do is use an iterator. It is basically a class that implements interface IF_HTMLB_TABLEVIEW_ITERATOR and allows you to change properties of each cell of your table. You can do the following:

1. Create an iterator class that implements this interface.

2. Code method RENDER_CELL_START( ) to set all elements of a given row as read-only or editable as required.

3. Leave other two methods empty but do activate them.

4. Declare a public reference in your view implementation class of same type as this iterator class.

5. Pass this iterator class to 'iterator' attribute of your <chtmlb:configTable> in view htm.

In the iterator class, you also need to access your table node to decide which rows to make editable and which row to make readonly. To do this, you can declare an attribute in this class of type CL_BSP_WD_CONTEXT_NODE_TV and instantiate it from the CONSTRUCTOR. And you can instantiate this iterator class from DO_VIEW_INIT_ON_ACTIVATION( ) of your view controller.

Regards,

Shiromani

Answers (0)