Ticket Q293847
Visible to All Users

ASPxGridView - How to get old values before updating the record

created 14 years ago

I need an event of gridview in which to keep values of 3 fields before saving the edit. In that event could be.
When the user presses the edit button, which will automatically keep the old values of fields in the grid, and when it will save your new, but always stayed with the old values, later to save a file.

Show previous comments (1)
IE IE
Industrias Energeticas 14 years ago

    I have the Session("COSTO")=e.oldvalues("COSTO") but now i want when press the button "UPDATE" from the editing row, the oldvalue save in historial table. in what event can save this value Session("COSTO") in my table with the news values?

    DevExpress Support Team 14 years ago

      Hello,
      In the same ASPxGridView.RowUpdating event you can store old values to your database. For example, you can create some SQL server connection, then initialize a custom InsertCommand, and put e.OldValues programmatically as you want.
      Thanks,
      Vest

      IE IE
      Industrias Energeticas 14 years ago

        Excelent ahi made in this event in my class a method to insert and call since the event updating.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.