This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. The [Category] field is populated by a dropdown list box that gets the categories from another table (and it works fine).
NET 3.5 Basics section of the Wrox Programmer to Programmer discussions.
I guess the Bind command tries to run before I have the chance to populate the DDL at all.
Based on their suggestions, I also added Append Data Bound Items="True" to it, but it doesn't really fix anything.
The problem simply comes when I go to edit the item.
Long story short, I added the Selected Value property to my DDL, and got this error: Argument Out Of Range Exception: 'Drop Down List1' has a Selected Value which is invalid because it does not exist in the list of items.
Parameter name: value I'm guessing that it's because the instant the Grid View goes into edit mode, the DDL is created but has a null value in it because it hasn't pulled the data from the Data Source yet.
I also tried: Someone over on the MS forums had this same problem on this thread: and some of the suggestions worked for some people, but not me. From here, you should be able to simply bind the Selected Value property of the Drop Down List using two-way databinding, like this: Thanks Lee, I tried that, but no dice.
I had a huge reply typed to you that explained a bunch of things I tried, but v Bulletin doesn't save your View State, and I lost it .