cancel
Showing results for 
Search instead for 
Did you mean: 

Make Table(sap.ui.table)Selection Check Box Non editable SAP UI5

Former Member
0 Kudos

Hi,

I have a sap.ui.table. My selelction mode is multi toggle in table. Based on some condition, I need to disable/non-editable the Table selection check box. I tried few blogs. But not helpful. Can anyone suggest your ideas?

Regards

Karthik S

Accepted Solutions (0)

Answers (1)

Answers (1)

SergioG_TX
Active Contributor
0 Kudos

what have you tried?

if you need to enable/disable a checkbox (per row) on a table, you will logically think this way:

1) identify the row / checkbox,

2) update the editable property of the checkbox

updating the model is easier than having to update the control itself -

Former Member
0 Kudos

Hi Sergio,

Thanks. I tried applying the checked property directly on the control. But it is throwing error.

Code:

var getAllRows = getCell.getRows();

getAllRows[0].getCells()[0].setEditable(false);

Error: Uncaught TypeError: getAllRows[0].getCells(...)[0].setEditable is not a function

Regards

Karthik S

SergioG_TX
Active Contributor
0 Kudos

editable is a property of the checkbox, so most likely you do not have the correct control selected.

use the developer tools (F12) on chrome to make sure you do have the correct control selected

Sharathmg
Active Contributor
0 Kudos

Try the code snippet in the below link.

This fulfills your requirement. It's a little tricky in terms of looping through the table to the items in a table. But, it should help you in your requirement.

http://jsbin.com/fosalo/edit?html,js,output

Former Member
0 Kudos

Thanks Sharath.

Former Member
0 Kudos

Thanks Sergio.

Sharathmg
Active Contributor
0 Kudos

If it helped, please close the thread.