Last post Feb 14, 2008 11:15 AM by Ganesh@Nilgris
Feb 14, 2008 06:42 AM|Ganesh@Nilgris|LINK
Under We have 3 class called article, category, comments.
The managecategories.aspx page leads to the category class
According to my understanding we have a gridview which shows options for edit and delete and
then a detailsview to show options Insert and update.
My problem is suppose i need to gridview from 2 class , say for example category and comments. Is it possible for me to achieve ?
Feb 14, 2008 08:47 AM|Lee Dumond|LINK
You mean, 2 Gridviews in the same page? No problem. You just need 2 ObjectDataSources to populate them and you should be all set.
Feb 14, 2008 10:40 AM|Ganesh@Nilgris|LINK
I mean 1 Gridview from 2 objectdatasource Is it possible?
Feb 14, 2008 11:02 AM|Lee Dumond|LINK
No, you can't create a single gridview from 2 ObjectDataSources.
You could, however, join the two tables together in a stored procedure using a SELECT statement with a JOIN, and return the data (or a portion of the data) from two (or more) tables together. Then, in your data provider class, you'd need to write a method
that uses that stored procedure to get the data, and in your BLL, another method that retrieves that data from the data provider. Then, you would use the BLL method as the Select part of an ObjectDataSource, and bind your GridView to that.
Feb 14, 2008 11:15 AM|Ganesh@Nilgris|LINK
I am creating a application similar "beerhouse"project. I have a form which is used to create users. while i fill up the form i need to give inputs from other tables, so i was thinking is it possible to have gridview from 2 object datasource. if this is
possible then i would have easily use one form for add. modify and
delete records. since it is possible i have to create 3 form now. Thanks for your help