ASP.NET Developer's JumpStart By Paul D. Sheriff, Ken Getz
Table of Contents
Chapter 16. Using the DataGrid Control
In this chapter, you'll place a DataGrid control on a page and add features. Specifically, you will perform the following tasks:
Bind a DataGrid control to an ADO.NET DataSet
Add numeric formatting to a currency field
Add paging so users can move through subsets of the data
Select an individual row
Sort the data by clicking a column header
Figure 16.1 shows the finished page you'll be building as you work through this chapter.
Figure 16.1. It's easy to create a bound table using the DataGrid control. To the browser, it's simply an HTML table with code added in for interactivity.
You will need to add a hyperlink to the main page to call the new page you build in this chapter. Follow these steps to add the link:
Open Main.aspx in design mode.
Add a new HyperLink control just below the Employees hyperlink.
Set the properties for this new HyperLink control as shown in Table 16.1.
Table 16.1. Set the New HyperLink Control's Properties Using These Values