Scott on Writing

Musings on technical writing...

GridView Examples Out the Wazoo

Since most “interesting” websites are data-driven sites, it comes as no surprise that the DataGrid is one of the most often used controls in ASP.NET 1.x applications.  In fact (...shameless plug warning...), I've written an entire book on the DataGrid, ASP.NET Data Web Controls Kick Start).  The DataGrid was a huge improvement over data display techniques used in classic ASP (namely, loops in server-side script intermixed with emitting HTML), making it super easy to display data and only slightly more difficult to add common data display tasks, such as formatting, paging, sorting, editing, deleting, and so on.  Additionally, while binding data to a DataGrid was simply - just a few lines of code - it still required hammering out code.  Bleh.

ASP.NET 2.0 still includes the DataGrid for backwards compatibility, but chances are you'll never use it when creating a new ASP.NET 2.0 page.  This is because the DataGrid has been greatly improved in 2.0's new GridView control.  The GridView introduces more properties and events than the DataGrid and allows for paging, bi-directional sorting, editing, and deleting support without writing any code.  Additionally, ASP.NET 2.0 includes data source controls, which are declarative controls that can be used to access data.  The result?  You can bind data to a GridView control in an ASP.NET 2.0 page without writing a lick of code.  To put it another way: you can create a fully functional, aesthetically-pleasing data-driven Web page that allows updating, deleting, paging, and bi-directional sorting in about three minutes.  Honest.

If you are wanting to learn more about the GridView check out my latest content on MSDN Online: GridView Examples for ASP.NET 2.0.  There are a ton of examples, screenshots, code snippets... to give it some scale, the Word document that contained this content clocked in at over 120 printed pages.  It's like a mini-book available online for free.  Enjoy!

posted on Friday, May 06, 2005 11:50 AM

Feedback

# re: GridView Examples Out the Wazoo 5/6/2005 4:09 PM stephen patten

Scott,

You won't use the DataGrid in your own applications yet you've written a book about it... go figure...

# re: GridView Examples Out the Wazoo 5/6/2005 11:19 PM Scott Mitchell

Stephen, I think you have your .NET jargon mixed up a bit. I use the DataGRIDS in my ASP.NET 1.x applications like nobody's business. If you are referring to this blog entry - http://scottonwriting.net/sowblog/posts/3615.aspx - I was talking about how I don't use DataSETS, which are a means for working with data. The DataGrid simply displays data from some data source (be it a DataSet, DataReader, custom collection, etc.).

# re: GridView Examples Out the Wazoo 5/7/2005 7:25 PM stephen patten

My bad, sorry Scott...I'm an idiot!!

BTW.. Great talk on HTTP handlers and modules today in Long Beach.

Stephen

# re: GridView Examples Out the Wazoo 5/8/2005 8:51 AM Vishal

hey Scott
Are you going to update your book for ASP 2.0 ...I loved reading your Data web controls book .

# I'm No Longer Cutting Edge 6/27/2005 8:43 PM Scott on Writing

# Provider Model Information Out the Wazoo 10/18/2005 3:13 PM Scott on Writing

# re: GridView Examples Out the Wazoo 12/7/2005 3:06 PM gregor suttie

When i try to run this i get the error saying its not setup for iis properly - how are the exmaples supposed to be setup Scott?

Can we get it to run without using iis?

Cheers
Gregor

Title:  
Name:  
Url:
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments   

Add To Your Reader

My Links

Archives

Post Categories

 

I am a Microsoft MVP for ASP.NET.
I am an ASPInsider.
<May 2008>
SMTWTFS
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

Comment Stats

DayTotal% of Total
Sunday 1866.8%
Monday 37913.9%
Tuesday 45316.7%
Wednesday 50418.5%
Thursday 53519.7%
Friday 49418.2%
Saturday 1666.1%
Total 2717100.0%

Hour1Total% of Total
12:00 AM 652.4%
1:00 AM 682.5%
2:00 AM 622.3%
3:00 AM 742.7%
4:00 AM 572.1%
5:00 AM 1033.8%
6:00 AM 1084.0%
7:00 AM 1585.8%
8:00 AM 1716.3%
9:00 AM 1475.4%
10:00 AM 1716.3%
11:00 AM 1816.7%
12:00 PM 1886.9%
1:00 PM 1696.2%
2:00 PM 1605.9%
3:00 PM 1324.9%
4:00 PM 1073.9%
5:00 PM 923.4%
6:00 PM 913.3%
7:00 PM 963.5%
8:00 PM 833.1%
9:00 PM 782.9%
10:00 PM 792.9%
11:00 PM 772.8%
Total 2717100.0%

Comments by Blog Entry Date/Time

Day Entry MadeAvg.Total
Sunday 5.54144
Monday 5.22339
Tuesday 4.28419
Wednesday 7.67637
Thursday 6.90607
Friday 5.48411
Saturday 5.33160
Total 5.842717

Hour1 Entry MadeAvg.Total
12:00 AM 5.0035
1:00 AM 1.002
5:00 AM 0.000
7:00 AM 7.0035
8:00 AM 5.35107
9:00 AM 6.32278
10:00 AM 6.47246
11:00 AM 4.41181
12:00 PM 6.88330
1:00 PM 3.00111
2:00 PM 5.41222
3:00 PM 8.64285
4:00 PM 4.0589
5:00 PM 5.92154
6:00 PM 4.52113
7:00 PM 9.67174
8:00 PM 9.80147
9:00 PM 5.05111
10:00 PM 5.4265
11:00 PM 4.5732
Total 5.842717

Learn More About Comment Stats
1 - All times GMT -8...


Blog Stats

Favorite Web Sites

My Books

My MSDN Articles