|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Please. join 2 tables and datagridI have a datagrid with 3 columns. I have 2 tables. the question is. ¿How
obtain or show in my datagrid the column1 and column2 of my fields the my table1 and de column3 a field of my table2? Thanks a lot. Not quite sure I understand your english but if you are asking this:
"How do I show 2 columns from one table, and 1 column from another table in one table in a datagrid?" then the answer is to programatically create a 3rd table and add the contents of the other 2 tables as necessary. Then bind your datagrid to the 3rd new table. But of course there are many issues to consider, such as how the data is related between the 2 tables. Is it a 1-1 relationship? If not, then I would question what you are trying to achieve. Also, you can always JOIN the data before you select it from the database, that way you will only get one table back that you can bind directly to your datagrid. SN Jose wrote: Show quoteHide quote > I have a datagrid with 3 columns. I have 2 tables. the question is. ¿How > obtain or show in my datagrid the column1 and column2 of my fields the my > table1 and de column3 a field of my table2? > > Thanks a lot. Sorry for my bad english Steven. Do you have a example code?
Thanks a lot "Steven Nagy" <learndot***@hotmail.com> escribió en el mensaje Not quite sure I understand your english but if you are asking this:news:1149482243.749837.17210@i40g2000cwc.googlegroups.com... "How do I show 2 columns from one table, and 1 column from another table in one table in a datagrid?" then the answer is to programatically create a 3rd table and add the contents of the other 2 tables as necessary. Then bind your datagrid to the 3rd new table. But of course there are many issues to consider, such as how the data is related between the 2 tables. Is it a 1-1 relationship? If not, then I would question what you are trying to achieve. Also, you can always JOIN the data before you select it from the database, that way you will only get one table back that you can bind directly to your datagrid. SN Jose wrote: Show quoteHide quote > I have a datagrid with 3 columns. I have 2 tables. the question is. ¿How > obtain or show in my datagrid the column1 and column2 of my fields the my > table1 and de column3 a field of my table2? > > Thanks a lot.
not sure how to describe this question...
App already running? Installation monitoring and capture...... Updating field in table Any way to allow F1 help for menu items in VB.NET? transparent labels on pictureboxes "Key not found" Exception Assigning to DataSource Property of Grid New obj() vs. New obj Unhandled exceptions in Vs 2005 Is Visual Studio Installer available with Visual Basic 2005 Expres |
|||||||||||||||||||||||