Hi

I am having a few problems with one of my forms... I have a data grid bound
to a dataset using a currencymanager and it's all working fine. However when
i edit or change any of the data in the Datagrids columns/rows i need to
call update so the changes are saved back to my database, this is where the
problems being. To catch the changed event of my data i have added the
following events based on the Dataset Class...

CBDataset.Tables["tbltest"].ColumnChanging += new
DataColumnChangeEventHandler(DGCB_ColumnChanging);

CBDataset.Tables["tbltest"].ColumnChanged += new
DataColumnChangeEventHandler(DGCB_ColumnChanged) ;

the column changing event is used to validate what has been entered and the
column changed event i use to run my update command. When a cell is changed
in my data grid both events fire however my update command returns 0 'the
state has not changed to modified'?? until i navigate either up or down rows
in the grid?? why is this and what can i do to get it to update without
navigating up/down rows in the grid before the data has a rowstate of
modified!

Regards

Darryn

Re: bound Datagrid and dataset - update??? by Earl

Earl
Tue May 31 16:17:27 CDT 2005

You may wish to work with the CurrentCellChanged event instead.

"Darryn" <darryn@datawave.com.au> wrote in message
news:uie0eiKZFHA.3280@TK2MSFTNGP09.phx.gbl...
> Hi
>
> I am having a few problems with one of my forms... I have a data grid
> bound
> to a dataset using a currencymanager and it's all working fine. However
> when
> i edit or change any of the data in the Datagrids columns/rows i need to
> call update so the changes are saved back to my database, this is where
> the
> problems being. To catch the changed event of my data i have added the
> following events based on the Dataset Class...
>
> CBDataset.Tables["tbltest"].ColumnChanging += new
> DataColumnChangeEventHandler(DGCB_ColumnChanging);
>
> CBDataset.Tables["tbltest"].ColumnChanged += new
> DataColumnChangeEventHandler(DGCB_ColumnChanged) ;
>
> the column changing event is used to validate what has been entered and
> the
> column changed event i use to run my update command. When a cell is
> changed
> in my data grid both events fire however my update command returns 0 'the
> state has not changed to modified'?? until i navigate either up or down
> rows
> in the grid?? why is this and what can i do to get it to update without
> navigating up/down rows in the grid before the data has a rowstate of
> modified!
>
> Regards
>
> Darryn
>
>