I have a problem, when I combine selected data from two tables to show in a gridview, the gridview show all the categories correctly at the top, and the data all shows, but in differente rows (data from table 1 in row 0 and table 2 in row 1) why? I'm not using inner join cause the two tables are already joined in a diagram by "ClientId", so I put them in different datasets (ds1 and ds2) and use merge ds1 with ds2.
Name Last Name Registration Purchases
So does your merged DataSet actually result in 2 different DataTables? From what you're saying, it sounds like you just want one DataTable, is this correct? How are you binding to your grid? And what do you mean by "I'm not using inner join cause the two tables are already joined in a diagram by "ClientId""? Oh, and one more question, you said "gridview", so I'm assuming ASP.NET, not WinForms ... correct? If so, you may need to post to the asp.net forums, but first let's see if it's an DataSet problem, which maybe we can resolve here.
Could you post the relevant code: the code you use to get the data into the 2 DataSets, the code you use to merge them and the code you used to bind to the grid.
~~Bonnie Berent DeWitt [C# MVP]
Could you please show us the code?
What's the structure of the two datatable and what' the data in them?
Does the fist row of the second datatable contain a blank row?
Does the two datatables have a same primary key? If so, then it will merge according to the primary key.
Bob Wu [MSFT]
MSDN Community Support | Feedback to us