Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
JQuery , javaScript ,ASP.NEt MVC
Hussain Patel
Sep 22 2016 9:52 PM
349
Reply
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);
//check if its greater than zero
if
(valueOfCell ==
''
){
// how to get the first column value , the if condition is not getting true
}
});
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Call ID in jquery
How-to-assign-selected-value-from-auto-complete-extender