Best form set up?? Not sure how to set this up

MartinaL

Active member
Joined
Jun 13, 2006
Messages
30
Programming Experience
1-3
I need to set up a form that shows the course competencies that a person has completed.

I want a drop down list at the top of the form that is a lsit of all the Courses, when a course is selected I then want the following to be displayed (in datagrid views or whatever anyone thinks will best suit my needs)

Competency Category name
Competency Name | Completed | Completed Date
Competency Name | Completed | Completed Date
Competency Name | Completed | Completed Date
Competency Category Name 2
Competency Name | Completed | Completed Date
Competency Name | Completed | Completed Date

So there are Courses, which contain Categorys (could be any number of categories in each course) and then in each category there are competencies that need to be completed (there could be any number of competencies in each category).

Any ideas??

I have attached the ER diagram of my database in the hope that it will help explain, you can disregard the tables not relating to either courses or cadets.

Only the Categories should be shown that are for the Course selected from the drop down list
 

Attachments

  • CadetAdmin_ER.pdf
    100.1 KB · Views: 23
That's quite a large problem to fit into a single post! I would advocate finding tutorials that show you how to connect to and retrieve data from a database in .NET 1.1, followed by showing it on a form and filtering dataset data.

I dont work with .NET 1.1 because I find the data access methods tedious and labour intensive to set up, compared to .NET 2.0. Other members of the forum are better skilled in .NET 1.1 than I; i'm sure one of them will be along to assist you shortly
 
Ok using these I have worked out how to populate one datagrid based on the selection from a drop down. And I can for example populate the datagrid with all of the course categories that are in a particular course.

But can I do this;

In a datagrid can you have say one row with the details from the COurse Category table, then under that in however many rows the details of the course comptencies in this category, then the next row is the next category, then under that the course competencies that are in that category?
 
A listview could be used here. I'm just thinking outloud but if you add all the appropriate columns etc to the listview, the first column could be the course category then below that add the sub items that would make up the course competancies. You'd have to populate the listview yourself of course but it could give you the format you want
 
Apart from using a datagrid do you know of any other way to accomplish this?

Some companies out there have controls that combine a treeview and a grid. Interesting devices, for sure! Best application I saw of one was an MP3 tagger where the folder structure was presented in the treeview and the tag contents in the grid.

If you can be more specific about the representation you need, im sure we can help
 
Okay i'll try and explain.

The application is for army cadet details.

So each cadet has to complete course competencies.

The course competencies belong to categories and the categories belong to a course.

so the table strucutre is Course -> CourseCategory -> CourseCompetency -> CadetsCourseCompetency -> Cadets

Each category can only belong to one course and each competency can only belong to one category.

But each course can have multiple categories and each of these categories can have multiple competencies.

So the form. I want it to be set up so that at the top there is a drop down with a list of courses, you select a course and a a list of the categories in this course is displayed and under each category the competencies are displayed with the name and a checkbox to mark if it is compelted or not.
 
Is this related to the other question? JMcIlhinney recently provided a nice tutorial on cascading combo boxes, but suffice to say, you would have a combo for your categories, courses and competencies

All the possible courses, cats and comps would be loaded into the relevant lookup tables, but in this scenario bindingsources would have to be used (rather than my notion of just coding straight to the datatable) because the cats bindingsource would have the course bindingsource as its datasource, and the relation between course:cats as its datamember.
Similarly, the comps datasource is the cats bindingsource, and comps datamember is the cats:comps datarelation.
For this you will need datasets with datarelations enabled.

If a cadet can have more than one competency, course or cat associated with them then a bridging table will be needed to decompose the relationship from m:m to 1:m+m:1. Logic for building these tables would be custom, rather than automatic as you have here.
 
Yes it is on the same page as the other question I posted about showing next of kin details for a person/cadet.

I also need to show the training details.

All Courses need to be shown, it is just the completed checkbox and date completed in the course competency that needs to show specifically for the selected cadet.

I have attached a screen shot of what I mean. The section on the right for the courses is not how I want it, I have jsut put all of these there to make sure that when I change the course the categories and competencies change. They do, I just now need a way for when the category is selected that a kind of tree view is show with all of the categories and their related competencies are shown.
 

Attachments

  • screen2.jpg
    screen2.jpg
    106.2 KB · Views: 53
A datagrid only shows what the underlying data source contains. You can write a grouping query that will fill the datasource with grouped data..

I'm not sure what question youre asking (i've been away on holiday and i 'formatted' my mind while there :D :D ) - are you talking about having cascading comboboxes that progressively refine their choices based on other combo selections?
 
I have decided to just do this by having the course drop down, and then a datagrid which is populated by a stored procedure the gets the course categories and the competencies for the selected course.

Ok, this has brought up another issue though. I don't want a binding navigator, I just want a save button to save the changes to this datagrid, will this work? when I click save how will it know which row has been modified or even if it has as all?
 
Back
Top