Chapter 4. The GridView and DetailsView Controls
This is the second in a two-chapter look at the new approach to accessing, displaying, and manipulating data introduced with ASP.NET 2.0. This new approach is based around the concept of data source controls and the new GridView and DetailsView bound controls. The previous chapter gave a brief overview of the process, demonstrated the ease with which it can be accomplished, and examined the data source controls in depth.In this chapter we'll build on what you've seen so far by looking in more detail at the two new controls for displaying rowset datathe GridView and DetailsView controls. These powerful yet easy-to-use controls include a wide range of features that make building even the most complex types of data-bound page a lot easier than it was in ASP.NET 1.x.The topics we'll be covering include the following:The new GridView control for displaying rowset data as a tableThe new DetailsView control for displaying rowset data as individual pagesThe simplified syntax for data binding expressions and the new XML binding syntaxHow to build data-bound pages with Microsoft Visual Studio .NET "Whidbey"
We start with a detailed look at the GridView control. You saw some examples of this control at the start of Chapter 3, but here you'll see how flexible it is and how easily it can be declared and used in even quite complex scenarios.