DataGrid and using Combo boxes

lsdev

Well-known member
Joined
Jan 20, 2008
Messages
61
Programming Experience
1-3
Hi,
As you can probably tell I am new to this forum, I am currently doing a project for my degree (Oracle Backend - VB.net front end). Now I know alot of forums are against helping people like myself as they are normally looking for someone to do the work for them. I on the other hand am not, I just need a little help regarding data grids....

I have a form that contains a data grid, I would ideally like to have a master detail relation between this data grid and the other details on the form, namely populated textboxes etc. But I can't seen to find a source that explains it in a way I understand. I would have though vb.net 2005 would have automated wizards for this?? Anyways I have worked round the problem by having a "Show detail" button. Which although is not ideal, it works. My form details with Jobs and their required skills.
The data grid holds a "JobID, MainSkill, SubSkill" The JobID relates to the master detail on the form and is populated into a textbox. The mainSkill and subskill are a lookup of the skill table I have which contains values such as:

Admin-Reception
Admin-HR
IT-Support Assistant
IT-IT Manager

The problem I have is that I don't know how to auto populate the data grid coulmn "JobID" with the value in the text box for new records created. Also I have set the MainSkill and SubSkill columns to look up the MainSkill and SubSkill vaules for the Skill table, but what I get is a list of duplicate values and then the selected MainSkill does not match that of the SubSkill. Is there a way to have a lookup of values equal to a query?

Many Thanks
 
Update

Right just to update I have over come lots of my issues using the following website, containing some very good tutorials:
http://msdn2.microsoft.com/en-us/vbasic/bb466226.aspx
I don't know if they are on a sticky but I feel these would answer lots of question regarding the basics behind using vb.net forms.

My only issue now is the problem I have with skills....
Basically I have a Job that contains:
JobID
description
.....

It has many skills :
JobID
MainSkill
SubSkill


The mainskill and subSkill are a joint primary key of the Skill table with details as such below:
IT,IT MANAGER
IT, IT SUPPORT
ADMIN, RECEPTIONIST
ADMIN, HR

The problem I have is the form that contains the records has the Job details in text view and the job skills in data grid view. This data grid has a lookup to the skill table pictured above. But my problem is that on selecting MainSkill I am still getting:
IT
IT
IT
ADMIN
ADMIN
ADMIN

And with the subSkill's I am gettin all of them. So what I need to know is a technique for getting unique MainSkills and then there appropriate subskill selections.

Thanks in advance
 
Can anyone suggest any methods of solving this? can I used filters? If so how as I habe never used them before?

Regards
 
Back
Top