ASP.NET
  Home arrow ASP.NET arrow Working with DataGrids
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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

Working with DataGrids
By: JB Reddy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 32
    2004-05-17

    Table of Contents:
  • Working with DataGrids
  • A Simple Data Display
  • How to Add Paging to the DataGrid
  • Navigate Page
  • Adding Edit Functionality to the DataGrid

  • 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


    Working with DataGrids


    (Page 1 of 5 )

    This article presents a simple data display with DataGrid, shows how to add paging to the DataGrid, and how to make the DataGrid editable. Learn how to reduce the data by providing filters so users do not get more data than they need. Also covered is how to edit the DataGrid by adding DataBound columns or using template columns.


    Feel free to download the support files for this article here.

    When publishing a list of records in a web page, we need to do a lot of work in the Classic ASP. But with ASP.NET a developer need not worry much except for setting some properties and adding a little code. In classic ASP we have no option of grids, but we have to write code for creating Table and creating Page Numbers, etc. Working with DataGrid is quite simple when compared to other listing web controls. We can place a grid (Drag and Drop) and bind to a DataSource object to simply presents all records. The DataGrid in Web controls accepts wide range of DataSource objects. As long as the object implements System.Collections.IEnumerabale interface, it can be assigned as a DataSource for the DataGrid. The objects, for example, DataView, ArrayList, HashTable can be used as DataSource in web pages.

    We can use XML or a database as a source for the data in the above said objects. For keeping common tasks in the view, I am going to present Database related code in this article. And one more point in the coding is, I am presenting the code which I wrote in the plain text editor so that users who use editors like UltraEdit and TextPad or NotePad may feel easy about understanding the coding. Those who use Visual Studio may not find much difficulty to use “code behind”.

    I would like to present a simple data display with DataGrid in the beginning, and later on show how to add paging to the DataGrid, and finally, how to make our DataGrid editable. This may look complicated, but it's nothing but setting properties of the DataGrid most of the time and adding a little bit of code.

    More ASP.NET Articles
    More By JB Reddy


     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek