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
Sharma Raushan
NA
527
15.2k
Button on click on dataTable is not firing.
Dec 1 2020 4:42 AM
I have a datatable in mvc
$(document).ready(function () {
$(
"#tblEmployee"
).dataTable({
ajax: {
type:
"get"
,
url:
"/Employee/GetAllEmployee"
,
dataType:
"json"
,
dataSrc:
""
},
columns: [{
'data'
:
'Id'
},
{
'data'
:
'Name'
},
{
'data'
:
'Salary'
},
{
'data'
:
'Id'
, render: function (data, type, row) {
return
'<button class="btn btn-info btn-sm btnEdit" data-Id='
+ row.Id +
'>'
+
'Edit'
+
'</button>'
;
}
},
{
'data'
:
'Id'
, render: function (data, type, row) {
return
'<button class="btn btn-info btn-sm btnDelete" data-Id='
+ row.Id +
'>'
+
'Delete'
+
'</button>'
;
}
}
]
});
});
Edit click is not firing
$(
".btnEdit"
).Click(function(){
alert(
"hello"
);
});
Reply
Answers (
1
)
JSON Feed an no values
Calculate the working hours of an employee while format is in 12 Hours