cancel
Showing results for 
Search instead for 
Did you mean: 

Selective disabling of rows in sap.m.table

former_member190882
Participant
0 Kudos

Hi Experts,

I have used sap.m.table in my application. Depending on the value in status column, I have to make the row in the table either editable or non-editable. How can I achieve this?

Also in the same table, the data is bound using the model. Now the combo box in the last column shows the value present in the data model. However the requirement is that the combo box should have items coming from a different model and if there exists a value in the data model, that appropriate item from the combo box has to be selected.

My table looks as follows.

Thanks

Maruthi

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Maruthi,

I guess you're using a column list item, for column list item there is no editable property. So, from your screenshot I can see you're using a dropdown and a MultiSelect for the table.

I would suggest apply this property on both the controls. And also editable: false will remove your dropdown, I would recommend you to use enabled property instead.

Check this working sample: Table Edit

Check the code here: JS Bin - Collaborative JavaScript Debugging


If the status is 'NotAssigned' then the controls will be disabled.

Regards,

Sai Vellanki.

former_member190882
Participant
0 Kudos

Thanks Sai. With few modifications I could use your solution and complete the requirement.

-Maruthi

former_member190882
Participant
0 Kudos

Hi Sai,

The solution selectively disables the rows. But the removes the select all check box itself from the table. Also after making the select all check box visible, even the disabled ones get selected. This I think is logically incorrect. Therefore I think it requires some change to the code.

Working on it...

Thanks

Maruthi

Answers (0)