Skip to Content
0

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

Aug 21, 2017 at 11:48 AM

80

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sergio Guerrero Aug 21, 2017 at 12:58 PM
0

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 -

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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

0
Former Member
Sharath M G

Thanks Sharath.

0

If it helped, please close the thread.

0

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

0
Former Member
Sergio Guerrero

Thanks Sergio.

0