Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm suggested to use JQuery data table. Now I need to populate grid with bunch of json objects sent from my controller. How can I send this data on the grid from js

$.ajax({
            ...
            url: '/Home/ReturnJsonData',
            success: function (result) {
                $.each(result, function (i, item) {
                    // this is where I should sent item object to my grid
                });
            },

            error: function () { alert("error"); }
        });

Update I've found these link, but I dont know how to implement it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
396 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use Jquery Grid Plugin in that case.

Read this article to use MVC Data Grid: using jqGrid and JSON

http://blog.davidrenz.com/?p=663

Update:

In that case if you only want to use J-query Datatable go to this link.

http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...