Wednesday, November 28, 2007

'DropDownList' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value

Exception Details: System.ArgumentOutOfRangeException: 'DropDownList' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

I've got a dropdownlist whose SelectedValue is bound to a sqldatasource whose dataset is dependent on the selected index of another dropdownlist. By the time the SelectedValue is bound, the other dropdownlist should already have the appropriate selectedIndex bound. I know this is just a matter of timing, but it's pretty frustrating none the less. To see that feedback was given and summarily ignored is downright infuriating.

Response provided from feedback:
"Thank you for submitting this suggestion. From the brief description you've provided, it's difficult to determine what's actionable here. If this is really a suggestion, can you provide a more detailed description of the scenario and what you would like to see improved? If you're experiencing a problem with the product, can you resubmit it as a 'code defect' and provide repro steps along with any example code that would enable us to repro the problem. You also mention that Microsoft is aware of the problem - is there a KB article or exisiting bug that you can reference? All of this will help us to determine what needs to be done."

Wow. That is one of the Laziest responses I've ever seen. And don't think the lack of an individuals name went unnoticed. Lazy AND Cowardly.

I felt a little better after reading this, and resolved myself to a codebehind solution (for the time being).

Addendum:
No problem should be posted without a usable solution. What's the point in finding this if it doesn't help or at least point you in the right direction.

I'm currently working with Telerik Controls which I like a lot, but they're based on existing MS components so their combobox, for example, inherits the same behavior. Here is an example from their documentation which should cover a wide range of issues similar to this one.

Labels: , ,

0 Comments:

Post a Comment

<< Home