Monday, May 28, 2007

Real World ASP.NET 2.0 GridView

I have posted earlier on how to Insert from a GridView

Matt Dotson has some nice ideas for a Real World GridView:
Bulk Editing
Two Headed & Grouping GridViews
Excel-like Frozen Headers for ASP.NET 2.0

ASP.NET 2.0 Data tutorials

My previous post was about how to Insert from a ASP.NET 2.0 GridView, and the tutorial linked was one of other ASP.NET 2.0 Data Tutorials posted by Scott Mitchell

In case you haven't came across these tutorials, here they are:

Good Work.

Inserting from the ASP.NET GridView

Scott Mitchel, has this nice idea of using the footer or a GridView as an inserting panel, Since the GridView already misses the inserting functionality, unlike the FormView or the DetailsView.

Here is the tutorial:

And he has a follow-up post on his blog to handle the case when the GridView has no rows!!
In this case the GridView unlike the old DataGrid won't display the footer nor the header...oops, (they should have gave us the option here) anyway, the workaround is to use the EmptyDataTemplate to put some controls (a DetailsView is a good option), and here are the full details: