datagrid column bind to a description column of a joined table

G

Guest

I have a SqlDataAdapter that queries the main table
tblTime and joining it with another table tblStaff just to
get a description

column "StaffName" from table. I

Select tblTime.StaffID, tblTime.TimeSpent,
tblStaff.StaffName
FROM tblTime INNER JOIN tblStaff ON tblTime.StaffID =
tblStaff.StaffID

A DataGid is bind to a DataSet generated out of the above
mentioned DataDapter. The DataGrid gets populated ok when
I

browse through the records. But when I add the values
programatically to the DataGrid (actually to the table
row) The

StaffName column does not get filled only the other two
columns from the main table tblTime are filled.

After I close the program and re-run it, the same record
shows the StaffName also which didn't appear last time
when I

added it.

How can I make it so that the StaffName appears right away
in DataGrid column when I add values to table rows. I have

checked the dataset schema also and have removed the
ReadOnly=True attribute from StaffName element.

Any help will be appreciated. TIA

Aamir
 
W

William Ryan

You may want to knot use the Join and then use a DataRelation object and it
should work.
 

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.

Ask a Question

Top