I would like bind grid view with 2 different tables that has no relation. Is it possible to do if so please guide me in achieving that
views:
54answers:
2
+1
A:
You can pick the data from different sources to an iList collection and bind it to a grid.
Kangkan
2010-08-14 10:07:51
Can i have an example or if any link please provide me
Dorababu
2010-08-14 10:11:08
@Dorababu: It would have been easier had you gave some details of the data that you wish to publish. Its so because, normally there won't be any data that one user would like to see in a row of a grid that have no relation to each other. Imagine, someone scrolling through a grid having 10 columns of which the left five tells about browser share in websites and the right five column shows data of price growth in market.
Kangkan
2010-08-15 07:14:52
I am having 2 tables namely custdetails and invoice. In custdetails i will have some data like email-id , name , customerId and all.. In my invoice i will invoiceId, customerid and other. Now i would like to search for the tools he purchased by entering his mail id which was from 1st table. If exists i would like to bind the data of second table to gridview along with the some fields in first table data like Name and Address.
Dorababu
2010-08-16 05:12:42
@Dorababu: So you already have a relation between the two tables, the customerId is in both the tables. You can do a query like select Invoice.*, Customer.* from Invoice inner join Customer on customer.customerId = invoice.customerId where customer.emailId=@givenEmailId
Kangkan
2010-08-16 05:37:08
Hey thanks a lot it works
Dorababu
2010-08-16 06:51:07
+1
A:
First retrieve data from different source in different Dataset. them merge both dataset and bind with gridview.
Pankaj Mishra
2010-08-14 12:10:43