Ok I am using the bootstrap grid but I want to use the more enhanced features of the data table functions. I am using json to pass the data back to the ajax get method. Also how does one apply filtering?
Also at this point I wont be able to access TempData because its not been set yet how do I overcome that.
<script>
$(document).ready(function () {
$("#example").DataTable({
"ajax": {
url: "/MISObjects/GetAuditTrailData",
type: "get",
database: "json"
},
"processing": true, // for show progress bar
"serverSide": true, // for process server side
"filter": true, // this is for disable filter (search box)
"orderMulti": false // for disable multiple column at once
})
});
</script>
And for my get method I am using the following
[HttpGet]
public IActionResult GetAuditTrailData() {
Int32.TryParse(TempData.Peek("CaseId").ToString(), out int resultCaseId);
TempData["CaseId"] = resultCaseId;
var auditTrailsHistory = _context.MisAuditTrail.Where(w => w.isActive == true && w.isDeleted == false &&w.MISObjectId==resultCaseId).ToList();
return Json(new { data = auditTrailsHistory });
}
But I am presented with the following error I am using asp.net core 3.1.
But Yet My Grid is called example
And its showing the dropdown for entries and the search but not applying them
I only want to Display 3 Columns for the grid Date User Action