Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82041

Using Datatables with MVC4 and WebAPI

$
0
0
hi - i have been trying for a couple of days (i know!) to wire up a datatable with json returned from an apicontroller without success. was wondering if anyone here has managed to do this. among other things, i have tried the approach suggested here:

http://www.briankeating.net/post/2012/07/08/Using-DataTablesnet-with-Asp-MVC-Web-Api.aspx

EDIT: the approach advocated is:

        $('#example').dataTable({
            "bJQueryUI": true,
            "bProcessing": true,
            "bServerSide": true,
            "sAjaxSource": "/api/myapicontroller/get"
        });

without success. i can't even make the call hit the controller.

also tried $.getJSON which does call the controller but the datatable resolutely refuses to render out the returned JSON. :(

Viewing all articles
Browse latest Browse all 82041

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>