Weird DataSet Problem

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi,

I have been working through this Microsoft support article
http://support.microsoft.com/default.aspx?scid=kb;en-us;310350. I have
adapted it slight in that I am not using in the context of a web service.
However whenever I make a change to the data via a bound DataGrid the
GetChanges method does not seem to work. If I add/delete a row, it works
fine. Also the Merge method does not appear to work, no error messages are
generated and some processing does appear to happen.

Mark
 
Miha,

In the database I am using there are columns with a type of bit. When these
are displayed via a DataGrid they are presented using a checkbox. When I
change a box from unchecked to checked, or vice-versa, and then hit the
button to update and then go to check the datastore I see that it has not
been updated. I then checked to see if the row was in the DataSet
MyChangedRows - it was not.

Any help you may be able to give would be great,

Mark

Miha Markic said:
Hi Mark,

Can you be a more specific?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
Mark said:
Hi,

I have been working through this Microsoft support article
http://support.microsoft.com/default.aspx?scid=kb;en-us;310350. I have
adapted it slight in that I am not using in the context of a web service.
However whenever I make a change to the data via a bound DataGrid the
GetChanges method does not seem to work. If I add/delete a row, it works
fine. Also the Merge method does not appear to work, no error messages are
generated and some processing does appear to happen.

Mark
 
Hi Mark,

Get BindingManagerBase for DataGrid (depends on how you bind data to grid -
see BindingManagerBase Class help) and invoke its EndCurrentEdit method
before doing update.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Mark Irvine said:
Miha,

In the database I am using there are columns with a type of bit. When these
are displayed via a DataGrid they are presented using a checkbox. When I
change a box from unchecked to checked, or vice-versa, and then hit the
button to update and then go to check the datastore I see that it has not
been updated. I then checked to see if the row was in the DataSet
MyChangedRows - it was not.

Any help you may be able to give would be great,

Mark

Miha Markic said:
Hi Mark,

Can you be a more specific?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
Mark said:
Hi,

I have been working through this Microsoft support article
http://support.microsoft.com/default.aspx?scid=kb;en-us;310350. I have
adapted it slight in that I am not using in the context of a web service.
However whenever I make a change to the data via a bound DataGrid the
GetChanges method does not seem to work. If I add/delete a row, it works
fine. Also the Merge method does not appear to work, no error
messages
are
generated and some processing does appear to happen.

Mark
 
Miha,

Many thanks for the reply - very helpful. Sorry for the delay in saying
thank you - but I was away from my PC for a few days.

Mark

Miha Markic said:
Hi Mark,

Get BindingManagerBase for DataGrid (depends on how you bind data to grid -
see BindingManagerBase Class help) and invoke its EndCurrentEdit method
before doing update.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Mark Irvine said:
Miha,

In the database I am using there are columns with a type of bit. When these
are displayed via a DataGrid they are presented using a checkbox. When I
change a box from unchecked to checked, or vice-versa, and then hit the
button to update and then go to check the datastore I see that it has not
been updated. I then checked to see if the row was in the DataSet
MyChangedRows - it was not.

Any help you may be able to give would be great,

Mark

Miha Markic said:
Hi Mark,

Can you be a more specific?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
Hi,

I have been working through this Microsoft support article
http://support.microsoft.com/default.aspx?scid=kb;en-us;310350. I
have
adapted it slight in that I am not using in the context of a web service.
However whenever I make a change to the data via a bound DataGrid the
GetChanges method does not seem to work. If I add/delete a row, it works
fine. Also the Merge method does not appear to work, no error messages
are
generated and some processing does appear to happen.

Mark
 
Back
Top