S
Shawn Wildermuth
I have a *single* SqlDataSource that loads up a single result set that I
show in a GridView. In the GridView, i've added a "Select" button and handling
the SelectedItem event. I also have a DetailsView (though FormView has this
same issue) where I want to be able to set the current item to bind to from
the DataSource. All the examples I've seen use two data sources and on every
*select* they do another round-trip to the Database (which makes no sense
to me). So this doesn't make much sense, why are all the properties ReadOnly?
DetailsView.DataItem
DetailsView.DataItemIndex
DetailsView.DataKey
The only one that isn't read only is DetailsView.PageIndex, but if you use
that...I cannot sort the GridView because then the index I get from the Grid
is sorted and the wrong ndex to use in the PageIndex.
Ideas?
Thanks,
Shawn Wildermuth
Speaker, Author and C# MVP
show in a GridView. In the GridView, i've added a "Select" button and handling
the SelectedItem event. I also have a DetailsView (though FormView has this
same issue) where I want to be able to set the current item to bind to from
the DataSource. All the examples I've seen use two data sources and on every
*select* they do another round-trip to the Database (which makes no sense
to me). So this doesn't make much sense, why are all the properties ReadOnly?
DetailsView.DataItem
DetailsView.DataItemIndex
DetailsView.DataKey
The only one that isn't read only is DetailsView.PageIndex, but if you use
that...I cannot sort the GridView because then the index I get from the Grid
is sorted and the wrong ndex to use in the PageIndex.
Ideas?
Thanks,
Shawn Wildermuth
Speaker, Author and C# MVP