TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hussain Patel
611
1.8k
537.4k
JQuery , javaScript ,ASP.NEt MVC
Sep 22 2016 9:52 PM
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
}
});
}
Reply
Answers (
1
)
Call ID in jquery
How-to-assign-selected-value-from-auto-complete-extender