How i can use list inside a list in DataTables.
How i can use list inside a list in DataTables.

I am having a list that each list item contain another list. On the time of render the column it will give me error "http://datatables.net/tn/7". I look a lot but not found any solution. Please help me to overcome by this issue.
Thanks
This discussion has been closed.
Answers
So after you followed the Diagnostic steps at the /tn/7 link, what is your server error?
I am facing 500 Internal Server error .
Full Error is below
A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.tblPropertyDocument_C39281F23DAA0C224A777580A8038E1E55D91AF3EBEC9D53EF39EC1E6EAAAD0C'.
I'm not sure where your problem is but a google search of
brings up many results. Maybe one of those will help. Otherwise post your server side code for additional help.
Kevin
JSON can't represent a circular structure. You'd need to parse it into a List which is not circular.
Allan
Actually I have a list of objects and inside each object i have another list. When i will return data to the datatable it will generate the circular error due for the inner list items. I know why this problem occur but not get how to resolve it.
Below is my code:
var SelectedAllSending = AllSending1.Select(s => new OutgoingCommunicationVM()
{
dDate = s.dDate,
id = s.id,
cDescription = s.tblDDLSelect.cDescription,
cSubject = s.cSubject,
Recipients = (from t in db.tblRecipients where (t.nMessageID == s.id) orderby t.cName select t).Take(3).ToList(),
TotalRecords = totalRecords,
PageCount = GetPageCountUSPS(s.id, s.tblDDLSelect.cDescription),
EstimatedCost = GetCost(s.id, s.tblDDLSelect.cDescription)
}).ToList();
as you see in my code I have a list "SelectedAllSending" and inside this list I have another list by the name off "Recipients".
When i will return value to the datatable it will give me error. Below is my code.
return Json(new { draw = draw, recordsFiltered = recordsTotal, recordsTotal = recordsTotal, data = SelectedAllSending }, JsonRequestBehavior.AllowGet);
object inside object gives circular error on json return. Or how i can pass list inside list in datatable.
please help me to overcome this issue.
,
Allan gave you the solution: parse your data into an acceptable format.
The inner list elements must refer to the outer elements, or perhaps to itself. You'd really need to ask in StackOverflow or similar for C# programming help I'm afraid.
Allan
@allan Here my list,
https://justpaste.it/5dygh
How can i display like table