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   

My Links

Ads Via DevMavens

Archives

Post Categories

 

I am a Microsoft MVP for ASP.NET.
I am an ASPInsider.
<March 2010>
SMTWTFS
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Comment Stats

DayTotal% of Total
Sunday 2056.8%
Monday 42514.1%
Tuesday 51917.2%
Wednesday 55518.4%
Thursday 58019.2%
Friday 54718.1%
Saturday 1886.2%
Total 3019100.0%

Hour1Total% of Total
12:00 AM 782.6%
1:00 AM 812.7%
2:00 AM 682.3%
3:00 AM 822.7%
4:00 AM 692.3%
5:00 AM 1264.2%
6:00 AM 1183.9%
7:00 AM 1816.0%
8:00 AM 1926.4%
9:00 AM 1585.2%
10:00 AM 1886.2%
11:00 AM 1936.4%
12:00 PM 2016.7%
1:00 PM 1846.1%
2:00 PM 1695.6%
3:00 PM 1354.5%
4:00 PM 1153.8%
5:00 PM 1073.5%
6:00 PM 1013.3%
7:00 PM 1073.5%
8:00 PM 923.0%
9:00 PM 882.9%
10:00 PM 913.0%
11:00 PM 953.1%
Total 3019100.0%

Comments by Blog Entry Date/Time

Day Entry MadeAvg.Total
Sunday 4.97159
Monday 4.80384
Tuesday 4.04477
Wednesday 7.39680
Thursday 6.26676
Friday 5.07466
Saturday 4.78177
Total 5.403019

Hour1 Entry MadeAvg.Total
12:00 AM 5.2937
1:00 AM 1.002
5:00 AM 0.000
7:00 AM 3.8550
8:00 AM 3.72134
9:00 AM 6.06297
10:00 AM 5.63276
11:00 AM 4.22194
12:00 PM 6.16351
1:00 PM 3.09133
2:00 PM 4.89230
3:00 PM 7.64321
4:00 PM 4.00108
5:00 PM 6.07170
6:00 PM 4.64116
7:00 PM 8.95188
8:00 PM 8.63164
9:00 PM 5.00115
10:00 PM 6.31101
11:00 PM 4.5732
Total 5.403019

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


Blog Stats

Favorite Web Sites

My Books

My MSDN Articles