|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
data binding and rejectchangesIf I edit more than one row in a databound DataGridView and then I want to
cancel the edits, calling the RejectChanges method in the DataTable often does not cause the grid to revert back to the original values - and never more than one row, when it does work. I've tried ResetBindingSource but that seems to be really flaky and throw inappropriate exceptions. What's the best way to cause the grid to show reverted values without having to load the data again? Paul never mind I got it
Show quoteHide quote "PJ6" <no***@nowhere.net> wrote in message news:uT3qxhI7GHA.660@TK2MSFTNGP03.phx.gbl... > If I edit more than one row in a databound DataGridView and then I want to > cancel the edits, calling the RejectChanges method in the DataTable often > does not cause the grid to revert back to the original values - and never > more than one row, when it does work. > > I've tried ResetBindingSource but that seems to be really flaky and throw > inappropriate exceptions. > > What's the best way to cause the grid to show reverted values without > having to load the data again? > > Paul > And the answer was?
PJ6 wrote: Show quoteHide quote > never mind I got it > > "PJ6" <no***@nowhere.net> wrote in message > news:uT3qxhI7GHA.660@TK2MSFTNGP03.phx.gbl... >> If I edit more than one row in a databound DataGridView and then I want to >> cancel the edits, calling the RejectChanges method in the DataTable often >> does not cause the grid to revert back to the original values - and never >> more than one row, when it does work. >> >> I've tried ResetBindingSource but that seems to be really flaky and throw >> inappropriate exceptions. >> >> What's the best way to cause the grid to show reverted values without >> having to load the data again? >> >> Paul >> > > I was using one dataset with multiple tables, I was just calling
rejectchanges on the wrong table. Paul Show quoteHide quote "Theo Verweij" <tverw***@xs4all.nl> wrote in message news:OfSdn1H8GHA.4116@TK2MSFTNGP03.phx.gbl... > And the answer was? > > PJ6 wrote: >> never mind I got it >> >> "PJ6" <no***@nowhere.net> wrote in message >> news:uT3qxhI7GHA.660@TK2MSFTNGP03.phx.gbl... >>> If I edit more than one row in a databound DataGridView and then I want >>> to cancel the edits, calling the RejectChanges method in the DataTable >>> often does not cause the grid to revert back to the original values - >>> and never more than one row, when it does work. >>> >>> I've tried ResetBindingSource but that seems to be really flaky and >>> throw inappropriate exceptions. >>> >>> What's the best way to cause the grid to show reverted values without >>> having to load the data again? >>> >>> Paul >>> >>
class library
Trouble with mouse click vb with odbc File handling in VB How to Load string into mshtml object? Detect WiFi Networks what method to use to add 1 day to a date (hotel reservation for one night by clicking on calender) How to reference Webform textbox controls in a for next loop PLEASE HELP - Executable properties - right click how to compare two date variables? |
|||||||||||||||||||||||