[RESOLVED]How to use gridview in asp.mvc

Hello i am novice in asp.net mvc so please tell me how could i use gridview in ,vc as like i am using in asp.net aspx page …

Easy answer: You don’t since the GridView is a servercontrol.

ASP.NET MVC gives more control over the generated HTML but on the other hand it is not possible to use servercontrols like you do in WebForms.

So what you need to do is create your own logic that works like you need and expect it to do.

A very interesting conversation regarding this subject is found here:

http://forums.asp.net/t/1546623.aspx

There I have also posted the following, which is sort of the gridview for MVC:

IvanLieckens

or if you like you could use the Grid for MVC that can be found in the MVC Contrib which very much offers the same if not even more functionality then the corresponding webforms control. (For examples and guidelines on the MVC Contrib Grid look here:

http://mvccontrib.codeplex.com/wikipage?title=Grid&referringTitle=Documentation)

Leave a Reply