Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

ASP.NET CORE Passing Model As Data

$
0
0

Is it possible to do something like this when passing data to a datatable?

the @Model.KIT_REQUEST_ITEM is a List<Object>

   $(document).ready(function () {

            var table = $('#details').DataTable({
                processing: true,
                serverSide: false,
                paging: false,
                ordering: true,
                searching: true,
                info: false,
                data: @Model.KIT_REQUEST_ITEM,               
                columns: [
                    { data: "Name" },
                    { data: "FBS_KITREQITEM_ORDEREDQUANTITY" }
                ]
            });
        });

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.


Viewing all articles
Browse latest Browse all 2364

Trending Articles