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
Murali krishna Ande
NA
57
51.6k
Approve multiple uses at once using Checkbox in knockout
Dec 24 2013 1:46 AM
Hi,
I have a requirement to Approve or Reject selected users at once using checkbox in knockout.
I can able to approve single user by using the below code
UserViewModel.prototype.approveFromApplied = function (user) {
var self = this;
user.statusId = 2;
if (confirm('Are you sure?')) {
$.ajax({
url: "Home/ApproveUser",
cache: false,
type: "POST",
contentType: "application/json; charset=utf-8",
data: ko.toJSON(user),
success: function (data) {
self.users.remove(function (item) {
return item.user_id === data[0].User_ID;
});
var u = self._map(data);
self.users.pushAll(u);
},
complete: function () {
//twittAlert("Broker(s) Approved successfully!", "success");
},
error: function (parameters) {
}
});
}
};
And I can able to show the checkbox and also done the checkAll/uncheckall functionality. But after selecting some users I need to pass those users to controller. How can I do it using knockout
can some body help on this.
Thanks in advance,
Murali Krishna.
Reply
Answers (
2
)
how to put code from js fiddle in to my .master page
Model popup