I am taking a C# Class and have two questions about a program we are writing. It consists of a checkedListBox that displays 3 makes of Car by Group and then the ModelYear like:
Ford
2007
2006
2005
Chevrolet
2004
2004 etc

The listBox is filled using LINQ from an Access DB
I have two issues:
1) Each line has a checkBox...how do I disable the checkBox
for the Group / CarMake?

2) How do I allow a Year to be selected, then get the Make
that goes with it so I can retrieve the price and display all
three in a TextBox at the bottom?

The structure you're trying to achieve would be better suited to a treeview. You could have each group as a root node then each year as a child of the group node.
The treeview has an option to show checkboxes. You will still have checkboxes on the groups too (unless you want to venture into some complicated API calls to prevent them showing) but you could handle the check changed event and add some code that would check all the years for the group if the group is checked..eg if the user checks the checkbox next to Ford then all the years in the Ford group will be checked.

It would make it much simpler to tell which group to use when a year is selected.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.