ASP.NET
  Home arrow ASP.NET arrow Page 2 - Behold the Power of the DataGrid!
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Behold the Power of the DataGrid!
By: Justin Cook
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 26
    2004-05-03

    Table of Contents:
  • Behold the Power of the DataGrid!
  • What on Earth is a DataGrid?
  • Data Binding
  • Who Wears Sort Sorts?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Behold the Power of the DataGrid! - What on Earth is a DataGrid?


    (Page 2 of 4 )

    Ok, how do I best explain this? All right, a common use of server-side programming is to retrieve data from a database and display it on a web page. You can then do additional things with the displayed data, such as give the users the option of adding one or more of the items to a shopping cart, perhaps giving moderators the ability to modify individual chucks of that data. Then, as you get more data, you'll want to add advanced features, like displaying incremental portions of the data, referred to as paging.

    Now all of these things can be accomplished with plain old ASP, and you'll find lots of help on ASP Free if that's what you want to do. But trust me, for every extra option you want, you've got approximately 1.5 million lines of code to type out (maybe a slight exaggeration). Then you have to go back and debug your improperly displayed tables. Then you have to add in client-side JavaScript to accomplish something fancy, then debug that! Then if you need to reuse the functionality in another page or application, there's usually a good deal of time wasted on figuring out where to copy and modify your code, then of course more debugging time.

    If you're thinking I have a chip on my shoulder here, you may be justified with such thoughts. This is only the case however, since I learned of an infinitely better way of doing it all. I was quite happy to whittle away the hours before, but now that Microsoft has taken such huge steps towards Rapid Application Development, I'm quite happy to change with the times.

    With ASP.NET, Microsoft realized that thousands of people are trying to do the very same or similar things in their ASP applications, so why not give them a much better way to do it? And thus is born the DataGrid. We can 'bind' the DataGrid to a dataset, and have it spit it all out in tabular format in a very automated fashion. We can easily configure advanced options like sorting and paging, by merely configuring a few attributes of the DataGrid.

    Excited yet? It's OK, you don't have to hide your excitement, you don't have to be worried about being called a geek. We all are, that's why we're here!  Throughout the following articles, we will discuss the various options of a DataGrid, including:

    • Data binding
    • Configuring display
    • Alternate row styling
    • Sorting
    • Paging
    • Selecting
    • Updating

    More ASP.NET Articles
    More By Justin Cook


     

    ASP.NET ARTICLES

    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT