>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