Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check if data has been changed
Message
From
31/10/2007 19:33:00
 
 
To
31/10/2007 00:31:21
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01265117
Message ID:
01265555
Views:
6
>Eduardo,
>
>Something like this:
>
>
>DataRowState rowState = MyDataSet.Tables["MyTable"].Rows[i].RowState;
>if (rowState != DataRowState.Unchanged)
>{
>    // put your code here
>}
>
>
>
>~~Bonnie
>
>
>
>>>>>>Hi
>>>>>>
>>>>>>How can I know if a field have been change in a form, so I can save the record automatically.(C#)
>>>>>>
>>>>>>Thanks
>>>>>
>>>>>Are your controls bound to a DataTable?
>>>>
>>>>Hi Mike
>>>>
>>>>Yes
>>>
>>>Check out the RowState property.
>>
>>Hi Mike
>>
>>I don’t know how to do that.
>>
>>I have a simple form with two textboxes, and a BindingNavigator. What I will like to do is to change the state of the buttons when data is change in any of the fields, or when you move to another record, if you have modify any field, ask to save or discard.

Hi Bonnie
It works fine if I change record. Dataset.Haschanges(), seems to do the same.
But for it to work the user has to move from the record. If he makes modifications to the data and close the form, Rowset or Haschanges are not aware of the change.
What I am trying to do is Enable a save button from my datanavigator as soon as the user modifies a field in the form.
Thank for your help Bonnie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform