How can i get the previous value of a control when editing a data grid?

How can i get the previous value of a control when editing a data grid?

Post by Blake Vers » Wed, 13 Aug 2003 22:22:37


When editing a datagrid (C#)
I need to know if the user changed the value of cell AND what the previous
value was.

Is this possible? If so how do I get the previous value or at least if the
cell has changed?

TIA
Blake
 
 
 

How can i get the previous value of a control when editing a data grid?

Post by v-lwan » Thu, 14 Aug 2003 12:16:12

Hi Blake,

In DataGrid.UpdateCommand, DataGrid.EditItemIndex can be retrieved before
it is set to -1. Therefore, we can use
dataset.Tables[0].Rows[DataGrid.EditItemIndex][i] to get the previous value
of the cell. Then, we can check if the user changed the value of the cell.

The following link may be helpful:
DataGrid.UpdateCommand Event
< http://www.yqcomputer.com/
/frlrfsystemwebuiwebcontrolsdatagridclassupdatecommandtopic.asp>

Does this answer your question? Please let me know if you need more
information.

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| From: "Blake Versiga" <.>
| Subject: How can i get the previous value of a control when editing a
data grid?
| Date: Tue, 12 Aug 2003 08:22:37 -0500
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <# XXXX@XXXXX.COM >
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: aux-217-3-232.dallas.net 209.217.3.232
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:167080
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| When editing a datagrid (C#)
| I need to know if the user changed the value of cell AND what the previous
| value was.
|
| Is this possible? If so how do I get the previous value or at least if the
| cell has changed?
|
| TIA
| Blake
|
|
|