Geeks With Blogs
The Stumblings of an IT Manager ...2 days before we go live and you want WHAT....?

Trying to figure out why the page that I am working on is locking up when non-initial loads of the page are called.  The page contains 4 bound items: 3 ComboBox controls and 1 SortableListView (custom implimentation of a Listview that contains a Gridview). The page is supposed to allow the user to select one item from each ComboBox, then click "Add" and those items will be added to the SLV.  At that point though, two of the three ComboBoxes must be re-loaded and the items that were previously selected need to be removed from the control.  The problem is that in the code, we were attempting to set the SelectedIndex to 0 (after testing to be sure there were items in the list); but the page seems to lock up before it loads. 

When I step through the code, this section (including setting the SelectedIndex) seems to work flawlessly, but later in the code that populates the entity that feeds the SLV, the page just locks up. This is where things get fun.  If I go back to where the code is setting the SelectedIndex, and comment it out, the page loads without issue.

If I saw this behavior without seeing the code, I would think that I was either attempting to set a second index on a control (which will fail), or attempting to set the index to something that does not exist; but in either case I would expect the page to display some sort of error message, and not just lock up.  Meh, I will keep you posted, but I am guessing that this will get chalked up to a hack solution (ie. I am just going to comment out the selection that selects the first item in the list.)

Posted on Monday, January 4, 2010 4:56 PM | Back to top


Comments on this post: Getting tangled up with WPF ComboBox binding

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © AndyScott | Powered by: GeeksWithBlogs.net