You may need to create custom check box to avail select all option, so that you can control which one to select based on some column value.
<input id="selectAll_tabel" style="zoom: 1.6;margin-left:5px;" type="checkbox" onclick="javascript:selectAllHandler(this)"/>
You can write a function something like this.
function selectAllHandler(element) { var selectAllChkId = "selectAll_table"; var tableId = "/Template1/Table1"; var checkboxSA = document.getElementById(selectAllChkId); console.log(checkboxSA.checked); var result=checkboxSA.checked; var recordCount = page.ui.get(tableId).getRecordCount(); for (var i=0;i<recordCount;i++) { var columnId="/Template1/Table1/Role_Map_CheckBox["+i+"]"; if(result==true) page.ui.get(columnId).setChecked(true); else page.ui.get(columnId).setChecked(false); }
}
------------------------------
Rameshkumar Chandrasekar
------------------------------
Original Message:
Sent: Fri December 02, 2022 10:53 AM
From: Sunil Hunashikatti
Subject: Disable checkbox in Table View with multiple select
Thank you Atanu.
It is working but when i click on select all checkbox present in table header (First column, first cell) - It selects the disabled checkboxes too.
How to make select all checkbox option to ignore the disabled rows?
------------------------------
Sunil
Original Message:
Sent: Fri December 02, 2022 07:08 AM
From: Atanu Roy
Subject: Disable checkbox in Table View with multiple select
Hi Sunil,
You can try below code -
this.ui.get("sampleList1")._instance.table.rows[index].cells[0].childNodes[0].childNodes[0].setAttribute("disabled", true);this.ui.get("sampleList1")._instance.table.rows[index].style.backgroundColor = "some_color";
------------------------------
Atanu Roy
Solution Architect
Salient Process
Original Message:
Sent: Fri December 02, 2022 05:44 AM
From: Sunil Hunashikatti
Subject: Disable checkbox in Table View with multiple select
Hi,
I have a table view (https://www.ibm.com/docs/en/baw/22.x?topic=api-table) in coach. Table rows gets populated with data depending on the results from backend. Table is configured with multiple selection - It would create a first column with checkboxes for all rows.
What i want is - Depending on some column values, i would like to disable checkboxes for particular rows.
Is it possible to disable checkboxes selectively in first column?
Also, is it possible to highlight these particular rows with different background colour.
Many Thanks,
------------------------------
Sunil
------------------------------