
CHAPTER 10 ■ RICH DATA CONTROLS
418
Figure 10-5. GridView selection
Using Selection to Create a Master-Details Form
As demonstrated in the previous chapter, you can bind other data sources to a property in a control
using parameters. For example, you could add two GridView controls and use information from the first
GridView to perform a query in the second.
In the case of the GridView, the property you need to bind is SelectedIndex. However, this has one
problem. SelectedIndex returns a zero-based index number representing where the row occurs in the
grid. This isn’t the information you need to insert into the query that gets the related ...