S
SteveM
Hi,
Say you have a GridView control that is sourcing it's data from an
ObjectDataSource whose select method returns a DataSet. By default, the
first table in the dataset is the bound to the GridView control.
I was wondering if there is a way to indicate (either through the
ObjectDataSource or the GridView) which table should be bound. If the
GridView is bound directly to a DataSet (through its DataSource property) I
can use the DataMember property of the Gridview to name the table I want
bound. Setting the DataMember property, however, throws and exception when
the Gridview is bound to an ObjectDataSource control.
I realize that I could just create a method in my undelying business object
that returns the specific table I want bound and set that method as the
select method of the ObjectDataSouce. I was just wondering, however, if
there is a way to do it so that the business object can return a dataset with
multiple tables and the GridView binds to one other than the first.
Thanks for any data binding insight you may be able to provide.
Say you have a GridView control that is sourcing it's data from an
ObjectDataSource whose select method returns a DataSet. By default, the
first table in the dataset is the bound to the GridView control.
I was wondering if there is a way to indicate (either through the
ObjectDataSource or the GridView) which table should be bound. If the
GridView is bound directly to a DataSet (through its DataSource property) I
can use the DataMember property of the Gridview to name the table I want
bound. Setting the DataMember property, however, throws and exception when
the Gridview is bound to an ObjectDataSource control.
I realize that I could just create a method in my undelying business object
that returns the specific table I want bound and set that method as the
select method of the ObjectDataSouce. I was just wondering, however, if
there is a way to do it so that the business object can return a dataset with
multiple tables and the GridView binds to one other than the first.
Thanks for any data binding insight you may be able to provide.