Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
955
Save Button Pressed causes row to be added and the last record in the table to be updated
posted

I have a webgrid inside a WARP. I have a Save button below the grid that is also inside the WARP. I have an AddNewRow on the webgrid. When the user enters their data for the new row, and then they press the save button, the new row is added, but it is also updating the last row in the table to what the user entered as the new data. So, when I look at the table in SQL Server, it basically has duplicate rows, but one is the new one and one was just an update to an existing record. Now, if a user types in their data and then simply clicks off that record, the row is added and no update is done. Why would this save button be causing this to happen. I have absolutely no code behind the save button...it's really just there because the user is used to being able to click a save button to save the rows and they can't grasp not having a button to press that saves their data.