By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,101 Members | 1,359 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,101 IT Pros & Developers. It's quick & easy.

Pulling data from different tables into one gridview

P: 1
Hello all,

I've been using this site quite a bit since starting my project and have found it very helpful. I have run into a roadblock though that I cant seem to scrounge up a solution to.

I have this dataset created (REACHpointsdataset) with a few tables in it (points, users, items, etc.), I also add another table to this database though code which I pull from a webservice. Two of the tables are of interest to me right now are empl (from the web service) and points, the first contains employee data and is kept up to date elsewhere (which is why I use a webservice to query that database) and the second is a local SQL database used to keep track of how many "points" an employee has. I have a column in each called "UserID" which is used as the primary key and I have a relationship created between them through this column.

Now comes where I having troubles, I have a datagrid created on one of my forms and on this datagrid I want to display the employee name from the "empl" table in one column and some points information from the "points" table for that employee in the other columns. Of course the employee name should not be edited so I am not concerned there but I need to have the other columns databound to the points table. I don't want to add an employee name to my points table for the reason that it would be redundant data.

Does anyone know of a way to do this? To have a datagrid contain select data from two different tables from one dataset.

Any advise would be appreciated
Thank You
Mar 22 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.