Stealwaxmem
New Member
Im working using Gridview and Sqldatasource, so , when Im tried to use the updatecommand, but when I clicked on, nothing happen, so, if I save a new record and after click on update command button , so , it works well. do you have any idea about whats happening ?the next is my code snipped\[code\] <asp:GridView ID="gvInfoCobradores" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateEditButton="True" OnRowEditing="gvInfoAdmin_RowEditing" OnRowUpdating="gvInfoAdmin_RowUpdating" DataSourceID="dsCobradorInfo" DataKeyNames="ID_Cobrador" Width="50%"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:CommandField ShowDeleteButton="True" /> </Columns> <EditRowStyle BackColor="#2461BF" /> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#EFF3FB" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> </asp:GridView> <asp:SqlDataSource ID="dsCobradorInfo" runat="server" ConnectionString="<%$ ConnectionStrings:SeminarioConnectionString %>" SelectCommand="SELECT * FROM [UsuariosSistema].[Cobrador]" OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [UsuariosSistema].[Cobrador] WHERE [ID_Cobrador] = @original_ID_Cobrador AND [NombreUsuarioCobrador] = @original_NombreUsuarioCobrador AND [PasswordCobrador] = @original_PasswordCobrador AND [NombreCobrador] = @original_NombreCobrador AND [ApellidoPaternoCobrador] = @original_ApellidoPaternoCobrador AND [ApellidoMaternoCobrador] = @original_ApellidoMaternoCobrador AND (([TelCobrador] = @original_TelCobrador) OR ([TelCobrador] IS NULL AND @original_TelCobrador IS NULL)) AND (([CelCobrador] = @original_CelCobrador) OR ([CelCobrador] IS NULL AND @original_CelCobrador IS NULL)) AND (([CorreElectronicoCobrador] = @original_CorreElectronicoCobrador) OR ([CorreElectronicoCobrador] IS NULL AND @original_CorreElectronicoCobrador IS NULL))" InsertCommand="INSERT INTO [UsuariosSistema].[Cobrador] ([NombreUsuarioCobrador], [PasswordCobrador], [NombreCobrador], [ApellidoPaternoCobrador], [ApellidoMaternoCobrador], [TelCobrador], [CelCobrador], [CorreElectronicoCobrador]) VALUES (@NombreUsuarioCobrador, @PasswordCobrador, @NombreCobrador, @ApellidoPaternoCobrador, @ApellidoMaternoCobrador, @TelCobrador, @CelCobrador, @CorreElectronicoCobrador)" UpdateCommand="UPDATE [UsuariosSistema].[Cobrador] SET [NombreUsuarioCobrador] = @NombreUsuarioCobrador, [PasswordCobrador] = @PasswordCobrador, [NombreCobrador] = @NombreCobrador, [ApellidoPaternoCobrador] = @ApellidoPaternoCobrador, [ApellidoMaternoCobrador] = @ApellidoMaternoCobrador, [TelCobrador] = @TelCobrador, [CelCobrador] = @CelCobrador, [CorreElectronicoCobrador] = @CorreElectronicoCobrador WHERE [ID_Cobrador] = @original_ID_Cobrador AND [NombreUsuarioCobrador] = @original_NombreUsuarioCobrador AND [PasswordCobrador] = @original_PasswordCobrador AND [NombreCobrador] = @original_NombreCobrador AND [ApellidoPaternoCobrador] = @original_ApellidoPaternoCobrador AND [ApellidoMaternoCobrador] = @original_ApellidoMaternoCobrador AND (([TelCobrador] = @original_TelCobrador) OR ([TelCobrador] IS NULL AND @original_TelCobrador IS NULL)) AND (([CelCobrador] = @original_CelCobrador) OR ([CelCobrador] IS NULL AND @original_CelCobrador IS NULL)) AND (([CorreElectronicoCobrador] = @original_CorreElectronicoCobrador) OR ([CorreElectronicoCobrador] IS NULL AND @original_CorreElectronicoCobrador IS NULL))"> <DeleteParameters> <asparameter Name="original_ID_Cobrador" Type="Int32" /> <asparameter Name="original_NombreUsuarioCobrador" Type="String" /> <asparameter Name="original_PasswordCobrador" Type="String" /> <asparameter Name="original_NombreCobrador" Type="String" /> <asparameter Name="original_ApellidoPaternoCobrador" Type="String" /> <asparameter Name="original_ApellidoMaternoCobrador" Type="String" /> <asparameter Name="original_TelCobrador" Type="String" /> <asparameter Name="original_CelCobrador" Type="String" /> <asparameter Name="original_CorreElectronicoCobrador" Type="String" /> </DeleteParameters> <InsertParameters> <asparameter Name="NombreUsuarioCobrador" Type="String" /> <asparameter Name="PasswordCobrador" Type="String" /> <asparameter Name="NombreCobrador" Type="String" /> <asparameter Name="ApellidoPaternoCobrador" Type="String" /> <asparameter Name="ApellidoMaternoCobrador" Type="String" /> <asparameter Name="TelCobrador" Type="String" /> <asparameter Name="CelCobrador" Type="String" /> <asparameter Name="CorreElectronicoCobrador" Type="String" /> </InsertParameters> <UpdateParameters> <asparameter Name="NombreUsuarioCobrador" Type="String" /> <asparameter Name="PasswordCobrador" Type="String" /> <asparameter Name="NombreCobrador" Type="String" /> <asparameter Name="ApellidoPaternoCobrador" Type="String" /> <asparameter Name="ApellidoMaternoCobrador" Type="String" /> <asparameter Name="TelCobrador" Type="String" /> <asparameter Name="CelCobrador" Type="String" /> <asparameter Name="CorreElectronicoCobrador" Type="String" /> <asparameter Name="original_ID_Cobrador" Type="Int32" /> <asparameter Name="original_NombreUsuarioCobrador" Type="String" /> <asparameter Name="original_PasswordCobrador" Type="String" /> <asparameter Name="original_NombreCobrador" Type="String" /> <asparameter Name="original_ApellidoPaternoCobrador" Type="String" /> <asparameter Name="original_ApellidoMaternoCobrador" Type="String" /> <asparameter Name="original_TelCobrador" Type="String" /> <asparameter Name="original_CelCobrador" Type="String" /> <asparameter Name="original_CorreElectronicoCobrador" Type="String" /> </UpdateParameters> </asp:SqlDataSource>\[/code\]Thanks in advance!!