Skip to Content

Selective disabling of rows in sap.m.table

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

sap table.png (47.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 28, 2015 at 11:00 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.