If there is a common field you can use a DataRelation object http://www.knowdotnet.com/articles/datarelation.html .
Otherwise you may want to create a query or a view that joins the table and
brings them over as a DataTable. The other alternative is to create a new
DataTable and copy the columns/rows from both tables into a new table.
AFAIK, there's not a clean or elegant way to do it unless you can establish
a DataRelation.
thanks.. follow up question:
if i create a new table with the info from both tables, then bind the new table to a datagrid, how do i ensure that values in the original 2 tables will also change along with the changes in the newly created table
Trap a grid event like current cell changed or a datatable event like
Rowchanged and when this is fired, check what column (DataGrid.CurrentCell
has both a Row and Column Index) and row were changed..this will give you a
reference to change the original datatable. This is starting to get a
litttle complex though..I'd probably still opt for finding a common field
between the two tables and using a DataRelation
SubT said:
thanks.. follow up question:
if i create a new table with the info from both tables, then bind the new
table to a datagrid, how do i ensure that values in the original 2 tables
will also change along with the changes in the newly created table.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.