ASP.NET MVC: Enhancing The WebGrid Series

For those who miss their WebForms GridView, we'll create a way to view your tabular data by building a feature-rich data grid from scratch for ASP.NET MVC.

Written by Jonathan "JD" Danylko • Last Updated: • MVC •
Grid Layout

Ok, it's been a while...so let's get back into some MVC!

For most ASP.NET developers, moving from WebForms to MVC was kind of a shock to many. I kept hearing a lot of developers cry about Microsoft not supporting WebForms in the future.

I would hear things like:

"Where is my ViewState?"

"How do I implement a Session now?"

"Where's the IsPostback?"

"Where are my server controls?"

The last one was the big one. Everyone was wondering if they had to rebuild all of the server controls from scratch.

This was definitely a shift in the way programmers thought about web applications and thought MVC wouldn't last.

"What?!...NO DATAGRID!?"

Some developers thought that moving to ASP.NET MVC was like falling back to the Classic ASP days, but the major concern was not having our server controls.

Now, WebForms had their snazzy DataGrid containing a lot of features required for making grids easier to use and implement in your web pages. You click and drag, connect to a data source, set your properties, and you were off and running.

Before MVC 3, there wasn't a data grid anywhere. There was a MVC Futures Grid available, but the MVC Futures project was changing daily and, personally, I didn't feel confident enough using it because it was changing daily (mainly because everyone wanted it!)

However, when ASP.NET MVC 3 came out, they included the WebGrid...

...and there was much rejoicing (yeahhhh!)...

...but not enough features. We would still need to build in more features and learn (GASP!) JavaScript!

Those were definitely the days...Ahhhh yes...being thrown off the balcony of the boat and learning to swim (translation: program in JavaScript). <Sigh>

Good Times...Good Times!

Ok, here's where you come in!

I need your help!

So with this Grid series, I want to ask you, the developer, what do you want to see in this grid? Let's push the limits of this series.

Let's create an MVC Grid that rivals some of the latest grid components out there. Once we have a number of grid requests, we'll go through each request implementing each feature with a full post.

So, what are some of the features that you are looking for in a full-featured grid?

  • Are you looking for Paging?
  • Maybe a cool way to filter
  • Unique way to sort?

I know these are simple features, but you tell me what kind of features you want in this grid. Each post will focus on your grid feature request.

To get you started and thinking about some features, I created a baseline sample project in GitHub.

https://github.com/jdanylko/WebGridExample

Start your engines...and imaginations!

Post your comments below. I will see you next week and review some of your grid feature requests.

Series: Enhancing the WebGrid

ASP.NET 8 Best Practices on Amazon

ASP.NET 8 Best Practices by Jonathan Danylko


Reviewed as a "comprehensive guide" and a "roadmap to excellence" with over 120 Best Practices for ASP.NET Core 8, Jonathan's first book by Packt Publishing explores proven techniques for every phase of the SDLC.

Learn industry-standard concepts to improve your coding, debugging, and deployment of ASP.NET Core websites.

Order now on Amazon.com button

Picture of Jonathan "JD" Danylko

Jonathan "JD" Danylko is an author, web architect, and entrepreneur who's been programming for over 30 years. He's developed websites for small, medium, and Fortune 500 companies since 1996.

He currently works at Insight Enterprises as an Architect.

When asked what he likes to do in his spare time, he replies, "I like to write and I like to code. I also like to write about code."

comments powered by Disqus