SelectProjectView ComboBox Does Not List All Projects, Only the First Project Record in the Database

May 7, 2010 at 3:17 PM

Great book Tim, thank you!

When I run the SmartCA application the SelectProjectView WPF Window displays as expected.

What I have found though is that the ComboBox that is meant to display a list of all projects so that you can select the one you want to work with never displays more than one project even if more than one project record is in the Project table in the database.

I added a second project record to the default database in the Project table and can see it in Server Explorer.

When I add a breakpoint to the code below and inspect "this.projects" I can see that the CollectionView Count is 2 and pulling both project records from the database but the ComboBox never displays all the records.

public CollectionView Projects
   get { return this.projects; }

The ComboBox does nothing when I click the down arrow to try and see what else is in the list; it acts like a static label that always shows the first record in the Project table.

Is this a bug?  Am I missing something that said this functionality to switch to another Project was not implemented?

This is with the latest source code in

I am using Visual Studio 2008 Pro, .NET 3.5 SP1 on Windows 7 64-bit. 

This same behavior also occurs on the same machine when I try to run the converted solution in Visual Studio 2010 Premium RTM. (I had this issue before VS2010 was ever installed on this machine BTW).