Here is a short example of how to do that. Create an MVC 3 or 4 Web Application Project. First let's create a Model called "Person" for our Data, which will hold the data for us:
In the Home Controller (HomeController.cs) of it under the Index Action Method, enter the following to generate some fake data for us and pass it to the view (of course one could query the database to do the same here):
Last but not least, on the Home View (Index.cshtml), add the following code:
Once you put it all together, you will get a simple Grid that looks like the following:
Of course there is a lot more you can do with the Grid, but this is definitely a great start! Feel free to download the Source Code of the above Test Project below (Visual Studio 2012 Solution):
Download: GridTest1.zip
Want to see the whole thing in a video? Take a look at this clip:
Pete Soheil
DigiOz Multimedia, Inc.
www.digioz.com
I am currently working on a project but I am having difficulty writing code for the application to save updates and editing of client information could some one help. please feel free to email me at cassianodan@gmail.com
ReplyDelete@ IT outsourcing company - Sure, I will try to write more blogs on this topic. :)
ReplyDelete@daniel korang-cassiano - Feel free to post any particular questions you may have on our message board at http://www.digioz.com/forum/ in the .NET Forum and I will be happy to help you with your questions.