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
kiran a
NA
20
9.3k
How to bind JQuery Datatable with list inside a class.
Feb 16 2021 8:27 PM
Hi,
I am trying to bind multiple jquery datatable with single ajax call. Below is code snippet.
How do we bind jquery datable when list is inside class.
Ajax call will return "ReportViewModel". List which is required to bind datatable will inside this object.
example as below
public
class
ReportViewModel
{
public
List AList {
get
;
set
; }
public
List MList {
get
;
set
; }
public
List ACList {
get
;
set
; }
}
public
class
ReportingDataViewModel
{
public
string
CN {
get
;
set
; }
public
string
RUrl {
get
;
set
; }
public
string
Status {
get
;
set
; }
public
string
StartTime {
get
;
set
; }
public
string
EndTime {
get
;
set
; }
}
how do i feed the data to datatable like data.Alist ??
$("#RolesTable").DataTable({
"processing": true, // for show progress bar
"serverSide": false, // for process server side
"filter": true, // this is for disable filter (search box)
"orderMulti": false, // for disable multiple column at once
"ajax": {
"url": "/Reports/GetReports",
"type": "POST",
"datatype": "json",
},
"columnDefs": [{
"targets": [0],
"visible": false,
"searchable": false
}],
please help.
Reply
Answers (
3
)
Create User Using Google Directory API with C#
fetch particular list data from share point using dot net core web api