using jQuery find the value of last column in the table and updated the checkbox in the first column based on the value in last column.
I have a table with first column name "Assign" having checkbox and last column name " assigned to". i have a button "Assign me" above the grid / table on clicking the button all the unassigned rows should be assigned be marked check box checked. .i.e if the value in last column is blank mean that is not assigned and first column should be checked.
This is what i have tried
- function selectAllUnassignedItems() {
- $("table[role='grid'] tr:not(:first)").each(function () {
- var valueOfCell = $(this).find('td:last-child').text();
- alert(valueOfCell);
-
- if (valueOfCell == ''){
-
- }
- });
- }