SteveJensen
Thu Sep 14 12:00:02 CDT 2006
The method I use to flag a change in the form data is to declare a form-level
variable:
dim bState as boolean = false
then in each of the following DataGridView event, put in bState = True
CurrentCellDirtyStateChanged 'catches changes to the data
RowsRemoved 'catches rows deleted
UserAddedRow 'catches new rows
"Thor Kornbrek" wrote:
> One way is to create a derived DataGrid TextBox control.
>
> Check this article out in the KnowlegeBase:
>
> HOW TO: Extend the Windows Form DataGridTextBoxColumn Control to Custom-Format Data
>
> Another way would be to use the CurrentCellChanged property of the DataGrid. The problem with that though is that only the current cell information is available. You can use this information and a couple of int variables to create a tracking mechanism.
>
> If you need clarification let me know.
>
> --
> Thor Kornbrek
> .Net Developer
>
http://www.thorknowsit.net
>
>
> "Dotnetjunky" wrote:
>
> > Hi .NET gurus,
> >
> > How can I detect when user has just edited any cell in my datagrid so that I can set a dirty flag in my application ?
> >
> > Any help is very much appreciated.
> >
> > Thanks.
> >
> > Kinh Luan