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
Guest User
Tech Writer
2.1k
469.8k
How to do dropDownlist using DataTable on Jquery?
Feb 17 2020 2:42 AM
Hi Team
I need some helpe below, basically i want to get dropdownlist for WhoAttend column, but my dropdownlist doesnt seem to work as expected. Need some improvement to this logic below, please mates.
$(document).ready(function () {
$(
"#EventsManagementsTable"
).DataTable({
"columnDefs"
: [
{
"width"
:
"5%"
,
"targets"
: [0] },
{
"className"
:
"text-center custom-middle-align"
,
"targets"
:[0, 1, 2, 3, 4, 5, 6] },
],
"serverSide"
:
"true"
,
"order"
:[0,
"asc"
],
"processing"
:
"true"
,
"language"
: {
"processing"
:
"processing...... please wait"
},
"ajax"
: {
"url"
:
"/Dashboard/GetData"
,
"type"
:
"POST"
,
"datatype"
:
"JSON"
,
},
"columns"
: [
{
"data"
:
"TrainingType"
,
"name"
:
"TrainingType"
},
{
"data"
:
"TrainingDescription"
,
"name"
:
"TrainingDescription"
},
{
"data"
:
"Price"
,
"name"
:
"Price"
},
{
"data"
:
"Venue"
,
"name"
:
"Venue"
},
{
"data"
:
"Facilitator"
,
"name"
:
"Facilitator"
},
{
"data"
:
"WhoAttend"
,
"name"
:
"WhoAttend"
},
{
"data"
:
"RSVP"
,
"name"
:
"RSVP"
},
{
className:
"center"
,
defaultContent:`<select name=
'slcCustom'
class
=
'custom'
>
<option value=
'default'
>select something</option>
<option value=
'1'
>Apple</option>
</select>`
}
]
});
});
Reply
Answers (
3
)
How to create the lable
Dropdownlist is not working on my DataTable?