Technical Training
ASP.NET 2.0ASP.NET GridView Control
ASP.NET GridView Control
In this tutorial you will learn about GridView Control, features of the GridView control, GridView supported field types and Creating a GridView control on a Page.
The GridView control is the official successor to the DataGrid control of yesteryears. It is no longer listed in the toolbox, even though it is supported by ASP.NET 2.0. All new projects would automatically use the GridView control. Though both these controls have a similar look and feel they are implemented differently as already explained in the earlier section of this tutorial. However, to reiterate some of the features of the GridView control let us list them:
- The GridView control is associated with the DataSource control through its DataSourceID property.
- In ASP.NET 2.0 there are several DataSource controls that are designed to work with different data sources.
- Enabling Editing and Deleting records in the GridView Control is as simple as setting the properties “AutoGenerateDeleteButton” and “AutoGenerateEditButton” as "True"
- GridView totally supports 6 field types, they are:
1. BoundField,
2. CheckBoxField,
3. ButtonField,
4. CommandField,
5. HyperlinkField,
6. ImageField and
7. TemplateField
Creating a GridView control on a Page
1. Create a Web site
2. Open the Default.aspx page in design view and drag a GridView control onto it.

3. Switch over to the Source view and examine the code. The following code will be displayed.
Click here to view sample code
4. For fetching records from a data source we need to add a SqlDataSource Control to the website. Click on the arrow and select
5. Click Ok. The Configuration Data Source wizard appears.

6. Click on New connection or select the connection for the application from the drop down list.
7. Next specify the columns that are to be bound to the GridView from the table.
ASP.NET 2.0
- Getting started with ASP.NET 2.0
- .NET Framework Fundamentals
- Microsoft.NET Framework Tools
- Application Development in .NET
- What's New in the .NET Framework 2.0 ?
- Introduction to Visual Studio.NET
- Installing Visual Studio.NET 2005
- Working with Visual Studio.NET Web Applications
- Whats New in ASP.NET 2.0
- Creating an ASP.NET Application
- ASP.NET Code Directory
- ASP.NET Page Object Model
- ASP.NET Server Controls
- ASP.NET Working With Master Pages
- ASP.NET Creating Content for Master Page
- ASP.NET Referencing Master Page Members
- ASP.NET Changing Master Pages Dynamically
- ASP.NET Creating Nested Master Pages
- ASP.NET Working with Web Parts
- ASP.NET Using Web Parts and Controls in Web Pages
- ASP.NET Web Pages and Layout
- ASP.NET - Adding Web Parts at Run Time
- ASP.NET Personalization: User Profiles and Themes
- ASP.NET Data Access features
- ASP.NET State Management
- ASP.NET Customizing the Session State Mechanism
- ASP.NET State Management And Caching
- ASP.NET Security
- Forms Authentication in ASP.NET
- ASP.NET Managing Membership and Roles
- ASP.NET Configuring Page-Level Caching
- ASP.NET Setting Application-Level Caching
- ASP.NET Data Source Object Model
- ASP.NET SqlDataSource Control
- ASP.NET Data Bound Controls
- ASP.NET GridView Control
- ASP.NET GridView Filtering
- ASP.NET Adding Sorting and Paging in GridView
- ASP.NET DataBound Controls - Details View
- ASP.NET Using a Grid to Display Detail Information
- ASP.NET Displaying Master-Detail Data on the Same Page
- Displaying Master-Detail Data on Separate Pages in ASP.NET
- ASP.NET Creating Web Wizards
- ASP.NET : Dynamic Image control
- ASP.NET Advanced Site Functionality







