DropDownList in ASP.NET Gridview Not Saving Changes Made During UPDATE
Posted on 2013-06-26
I've taken a gridview and replaced several of the fields with dropdownlists.
The Gridview is bound to a SQLDataSource and the dropdownlists are bound to a different SQLDataSource. Generally I autoload all of the lookup table values into a dataset on page_load and bind my controls to the specific tables in the dataset. The problem I'm having is because the ddls are inside of the gridview and I can't figure out why the selectedvalue isn't being saved when I click on the UPDATE button. It's wasn't originally throwing an exception it's just wasn't saving. Now it's throwing an exception stating it "Cannot insert the value NULL". Column does not allow nulls.
Where should I begin troubleshooting this?