I have a gridview and I am trying to use the update button in the designer. The query to fill the grid works fine. When I change the values in the drop downs and press update I get no errors, the grid control goes back to it's initial state but the data is not written to the DB. I have a few controls in the grid that are hidden ( to bind to the dropdowns for the selectedvalue) It seams to be all coded correctly and I don't get any errors at runtime so I am just stuck. Gridview code: \[code\]<asp:GridView ID="grdProgress" runat="server" AutoGenerateColumns="False" CellPadding="4" Font-Size="Smaller" HorizontalAlign="Center" RowStyle-HorizontalAlign="Center" Width="938px" DataSourceID="progress" EnableModelValidation="True" ForeColor="#333333"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:CommandField ShowEditButton="True" /> <asp:TemplateField HeaderText="Fruit_ID" SortExpression="Fruit_ID"> <EditItemTemplate> <asp:Label ID="Label15" runat="server" Text='<%# Eval("Fruit_ID") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label13" runat="server" Text='<%# Bind("Fruit_ID") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Size" SortExpression="Size"> <EditItemTemplate> <asp:Label ID="Label16" runat="server" Text='<%# Eval("Size") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label14" runat="server" Text='<%# Bind("Size") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Grade" SortExpression="Grade"> <EditItemTemplate> <aspropDownList ID="grdDdlGrade" runat="server" AppendDataBoundItems="True" SelectedValue='http://stackoverflow.com/questions/12700069/<%# Bind("Grade") %>'> <asp:ListItem Text="(Select)" Value=""></asp:ListItem> <asp:ListItem Text="AA" Value="http://stackoverflow.com/questions/12700069/AA"></asp:ListItem> <asp:ListItem Text="A" Value="http://stackoverflow.com/questions/12700069/A"></asp:ListItem> <asp:ListItem Text="B" Value="http://stackoverflow.com/questions/12700069/B"></asp:ListItem> <asp:ListItem Text="C"></asp:ListItem> <asp:ListItem Value="http://stackoverflow.com/questions/12700069/F" Text="F"></asp:ListItem> <asp:ListItem Value="http://stackoverflow.com/questions/12700069/USF" Text="USF"></asp:ListItem> <asp:ListItem Text="USXF" Value="http://stackoverflow.com/questions/12700069/USXF"></asp:ListItem> <asp:ListItem Text="USXF B" Value="http://stackoverflow.com/questions/12700069/USCFB"></asp:ListItem> <asp:ListItem Text="USXF P" Value="http://stackoverflow.com/questions/12700069/USXFP"></asp:ListItem> <asp:ListItem Text="USXF R" Value="http://stackoverflow.com/questions/12700069/USXFR"></asp:ListItem> <asp:ListItem Text="CULL" Value="http://stackoverflow.com/questions/12700069/CULL"></asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Bind("Grade") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Starch" SortExpression="Starch"> <EditItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# Eval("Starch") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("Starch") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Def_1" SortExpression="Def_1"> <EditItemTemplate> <aspropDownList ID="grdDdlDef1" runat="server" AppendDataBoundItems="True" DataSourceID="defects" DataTextField="description" DataValueField="defect_id" SelectedValue='http://stackoverflow.com/questions/12700069/<%# Bind("def_id_1") %>' AutoPostBack="True"> <asp:ListItem Value="http://stackoverflow.com/questions/12700069/0" Text="(Select)"></asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label3" runat="server" Text='<%# Bind("Def_1") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Def_2" SortExpression="Def_2"> <EditItemTemplate> <aspropDownList ID="grdDdlDef2" runat="server" AppendDataBoundItems="True" DataSourceID="defects" DataTextField="description" DataValueField="defect_id" SelectedValue='http://stackoverflow.com/questions/12700069/<%# Bind("def_id_2") %>'> <asp:ListItem Value="http://stackoverflow.com/questions/12700069/0" Text="(Select)"></asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label4" runat="server" Text='<%# Bind("Def_2") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Color" SortExpression="Color"> <EditItemTemplate> <aspropDownList ID="grdDdlColor" runat="server" AppendDataBoundItems="True" DataSourceID="color" DataTextField="score" DataValueField="rec_id" SelectedValue='http://stackoverflow.com/questions/12700069/<%# Bind("color") %>'> <asp:ListItem Value="" Text="(Select)"></asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label5" runat="server" Text='<%# Bind("Color") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Bkgrd" SortExpression="Bkgrd"> <EditItemTemplate> <aspropDownList ID="grdDdlBkrd" runat="server" AppendDataBoundItems="True"> <asp:ListItem Value="">(Select)</asp:ListItem> <asp:ListItem>Green</asp:ListItem> <asp:ListItem>Green/Yellow</asp:ListItem> <asp:ListItem>Yellow/Cream</asp:ListItem> <asp:ListItem>Cream</asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label6" runat="server" Text='<%# Bind("Bkgrd") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="App_1" SortExpression="App_1"> <EditItemTemplate> <aspropDownList ID="grdDdlApp1" runat="server" AppendDataBoundItems="True" DataSourceID="app_defect" DataTextField="description" DataValueField="defect_id" SelectedValue='http://stackoverflow.com/questions/12700069/<%# Bind("app_def_id_1") %>'> <asp:ListItem Value="http://stackoverflow.com/questions/12700069/0">(Select)</asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label7" runat="server" Text='<%# Bind("App_1") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Rate_1" SortExpression="Rate_1"> <EditItemTemplate> <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Rate_1") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label8" runat="server" Text='<%# Bind("Rate_1") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="App_2" SortExpression="App_2"> <EditItemTemplate> <aspropDownList ID="ddlAppDef2" runat="server"> <asp:ListItem Value="http://stackoverflow.com/questions/12700069/0">(Select)</asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label9" runat="server" Text='<%# Bind("App_2") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Rate_2" SortExpression="Rate_2"> <EditItemTemplate> <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("Rate_2") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label10" runat="server" Text='<%# Bind("Rate_2") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="WC" SortExpression="WC"> <EditItemTemplate> <aspropDownList ID="grdDdlWC" runat="server" SelectedValue='http://stackoverflow.com/questions/12700069/<%# Bind("WC") %>' AutoPostBack="True"> <asp:ListItem Value="http://stackoverflow.com/questions/12700069/0"></asp:ListItem> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> <asp:ListItem>3</asp:ListItem> <asp:ListItem>4</asp:ListItem> <asp:ListItem>5</asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label11" runat="server" Text='<%# Bind("WC") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="IB" SortExpression="IB"> <EditItemTemplate> <aspropDownList ID="grdDDlIB" runat="server" SelectedValue='http://stackoverflow.com/questions/12700069/<%# Bind("IB") %>' AutoPostBack="True"> <asp:ListItem>0</asp:ListItem> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> <asp:ListItem>3</asp:ListItem> <asp:ListItem>4</asp:ListItem> <asp:ListItem>5</asp:ListItem> </aspropDownList> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label12" runat="server" Text='<%# Bind("IB") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="qc_id" SortExpression="qc_id" Visible="False"> <EditItemTemplate> <asp:Label ID="Label17" runat="server" Text='<%# Eval("qc_id") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label15" runat="server" Text='<%# Bind("qc_id") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="def_id_1" SortExpression="def_id_1" Visible="False"> <EditItemTemplate> <asp:Label ID="Label21" runat="server" Text='<%# Eval("def_id_1") %>'></asp:Label> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label16" runat="server" Text='<%# Bind("def_id_1") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="def_id_2" SortExpression="def_id_2" Visible="False"> <EditItemTemplate> <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("def_id_2") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label17" runat="server" Text='<%# Bind("def_id_2") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="app_def_id_1" SortExpression="app_def_id_1" Visible="False"> <EditItemTemplate> <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("app_def_id_1") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label18" runat="server" Text='<%# Bind("app_def_id_1") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="app_def_id_2" SortExpression="app_def_id_2" Visible="False"> <EditItemTemplate> <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("app_def_id_2") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label19" runat="server" Text='<%# Bind("app_def_id_2") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="color" SortExpression="color" Visible="False"> <EditItemTemplate> <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("color") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label20" runat="server" Text='<%# Bind("color") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> <EditRowStyle BackColor="#7C6F57" /> <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" /><HeaderStyle BackColor="#046CAB" ForeColor="White" Wrap="False" Font-Bold="True"></HeaderStyle> <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" /><RowStyle HorizontalAlign="Center" BackColor="#E3EAEB"></RowStyle> <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" /></asp:GridView>\[/code\]And datasource code :\[code\] - <asp:SqlDataSource ID="progress" runat="server" ConnectionString="<%$ ConnectionStrings:AADConnectionString %>" SelectCommand="SELECT DISTINCT convert(int,qcd.fruit_id) as Fruit_ID, qcd.size_name as Size, qcd.grade as Grade, convert(decimal(15,1),qcd.starch) as Starch, qcd.def_id_1, def1.description as 'Def_1', qcd.def_id_2, def2.description as Def_2, qcd.color, cs.score as 'Color', qcd.background as 'Bkgrd', qcd.app_def_id_1, def3.description as App_1, qcd.app_rating_1 as Rate_1, qcd.app_def_id_2, def4.description as App_2, qcd.app_rating_2 as Rate_2, --qcf.color, qcd.watercore as WC, qcd.internal_browning as IB, qcd.qc_id as qc_id --qcd.status FROM t_ap_qc_master_fta qcf LEFT OUTER JOIN t_ap_qc_master qcm (NOLOCK) on qcm.qc_id = qcf.qc_id LEFT OUTER JOIN t_ap_qc_detail qcd ON qcf.qc_id = qcd.qc_id and qcf.fruit_id = qcd.fruit_id LEFT OUTER JOIN t_defect def1 ON def1.defect_id = qcd.def_id_1 LEFT OUTER JOIN t_defect def2 ON def2.defect_id = qcd.def_id_2 LEFT OUTER JOIN t_defect def3 ON def3.defect_id = qcd.app_def_id_1 LEFT OUTER JOIN t_defect def4 ON def4.defect_id = qcd.app_def_id_2 LEFT OUTER JOIN t_ap_qc_color_score cs (NOLOCK) on cs.rec_id = qcd.color WHERE qcd.qc_id = @qc_id ORDER BY qcd.fruit_id" UpdateCommand="update t_ap_qc_detail set grade = @Grade, def_id_1 =@Def_1, def_id_2 = @Def_2, app_def_id_1=@App_1, app_rating_1 = @Rate_1, app_def_id_2 = @App_2, app_rating_2 = @Rate_2, color = @color, background = @Bkgrd, watercore = @WC, internal_browning = @IB, starch = @Starch where qc_id = @qc_id and fruit_id = @Fruit_ID" > <SelectParameters> <asp:ControlParameter ControlID="listQcId" Name="qc_id" PropertyName="SelectedValue" /> </SelectParameters> <UpdateParameters> <asparameter Name="Grade" Type="String"/> <asparameter Name="Def_1" Type="Int32" /> <asparameter Name="Def_2" Type="Int32" /> <asparameter Name="App_1" Type="Int32" /> <asparameter Name="Rate_1" Type="String"/> <asparameter Name="App_2" Type="Int32" /> <asparameter Name="Rate_2" Type="String" /> <asparameter Name="color" Type="Int32" /> <asparameter Name="Bkgrd" type="Int16"/> <asparameter Name="WC" Type="Int32" /> <asparameter Name="IB" Type="Int32" /> <asparameter Name="Starch" Type="Int32" /> <asparameter Name="qc_id" Type="Int16" /> <asparameter Name="Fruit_ID" Type="Int16"/> </UpdateParameters> </asp:SqlDataSource>\[/code\]