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
Ramco Ramco
441
3.4k
523.1k
How to disable Delete
Jun 2 2021 3:44 PM
Hi
With the below code how i can disable Delete button if IsActive = "N"
$('#tblLocation').DataTable({
"ajax": {
"url": '/Location/List',
"type": "get",
"datatype": "json",
dataSrc: ""
},
paging: true,
sort: true,
pageLength: 10,
searching: true,
"columns": [
{ "data": "Id", "autoWidth": true },
{ "data": "Description", "autoWidth": true },
{ "data": "IsActive", "autoWidth": true },
{
"data": "Id", "render": function (data) {
return "<a class='btn btn-primary btn-sm' data-Id=" + data + " id='btnEdit'><i class='fa fa-pencil'></i> Edit</a> <a class='btn btn-danger btn-sm' data-Id=" + data + " id='btnDelete' style='margin-left:5px' ><i class='fa fa-trash'></i> Delete</a>";
}
}
]
});
Thanks
Reply
Answers (
1
)
Too many redirects error in MVC application
convert image from array of binary to image