Form View and Details View controls are quite similar, but differ in the way they lay out their outputs.
This time around, I draw on an article by Dino Esposito that deals with using the Details View and Form View controls in ASP.
NET 2.0 that work with Data Grid and Grid View to enable easy construction of attractive, readable, data-driven record displays.
I have a *single* Sql Data Source that loads up a single result set that I show in a Grid View.
In the Grid View, i've added a "Select" button and handling the Selected Item event.
As it happens, though ASP 1.x included some powerful and usable data-bound controls, none of them were designed to manage views of individual records. Microsoft now offers new controls that support single-record views.
Building master/detail views typically means allowing users to select individual records from a comprehensive records list (the master part) and then to display and manipulate the contents of a single selected record (the detail part). NET 1.x was that, while it could show individual record fields using the Data Grid, Grid View and other controls, it couldn't really manage a master/detail view or provide record-view control without buying third-party tools or building equivalent functionality on your own. In particular, Form View and Details View controls now work with Data Grid and Grid View to make it easy to create master/detail views.
Thanks, Steven Cheng Microsoft Online Support Get Secure!
(This posting is provided "AS IS", with no warranties, and confers no rights.) -------------------- | Message-ID: | Subject: Details View or Form View, how to set Selected Index?
That's because the Grid View (used for the master view) isn't updated until the Details View (used for the details view, naturally) posts changes to the actual record.
The way to keep things synchronized, therefore, is to force Grid View to refresh its data source any time a detail record is updated -- easy to arrange, because the Details View control posts an Item Updated event each time an update is processed.
I'm not sure on your detailed scenario, do you mean in your Grid View you've retrieved all the column info so that you don't need to requery the Data Base for further fields to displayed in Details View (and reuse the existing record data in Grid View row)?