bound Datagrid and dataset - update???

D

Darryn

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top