Sqldatasource updating gridview trouble updating ipod touch to 4 3
NET 2.0 Professional section of the Wrox Programmer to Programmer discussions.
I have a select statement set in an Sql Data Source that returns a result table like this: Major Stone ID | Band Style ID | Type ID | Cut ID | Weight | Color | Clarity | Qty | Unit Price | Stone Name | Cut Name Stone Name and Cut Name come from joins with other tables. Updating, the new values collection also does not have the updated values. To simplify the problem, if I set up my Sql Data Source the same way, then drop a datagrid on the form and autogenerate the columns and edit buttons, I still get the problem.
I converted the "Categories" column to a template field, and populated it with a dropdown box that pulls the names from my Categories table (and it works surprisingly :)), but just doesn't update. Yes, that's why I wanted to see your Update parameters, because, as I suspected, there's no Control Parameter that passes the selected value of the dropdownlist.
I'd be happy to post more of my code if it would help you out, I just didn't want to flood my post with code that wasn't relevant to the problem. Hence, the Update statement has no idea where to get the @Category value from. Yes, that's why I wanted to see your Update parameters, because, as I suspected, there's no Control Parameter that passes the selected value of the dropdownlist.
But the value of the ddl box is not inserted into the record.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.Hence, the Update statement has no idea where to get the @Category value from. I'm not new to programming, just new to C#, so I have a decent handle on program logic and the flow. NET is just so new to me that I don't know many of the intricacies of how to accomplish even the most basic stuff.Could you be so kind as to point me to a tutorial that might help me out? Actually, looking at what you're trying to do a bit more closely, it looks like what you have is probably OK.