no update performed
-
- Posts: 7
- Joined: Tue 07 Aug 2007 10:00
no update performed
hi there!
i have an mysqltableadapter an a select statement to fill a devexpress grid.well showing data from the database work well, but i cannot perfom an update/delete/insert on my tableadapter!
ive perfomring adapter.update(dataset) on each cellvalue changed, but no update is performed through the database (i have created the corresponding update/ins/deletioncommands as well). am i working the incorrect way with the adapter? do have to call a method to fill the parameters? can anyone give me advise how to perfom an update?
thanks in advance
AU
_______
VS 2005
crlab mysql connector for NET2
i have an mysqltableadapter an a select statement to fill a devexpress grid.well showing data from the database work well, but i cannot perfom an update/delete/insert on my tableadapter!
ive perfomring adapter.update(dataset) on each cellvalue changed, but no update is performed through the database (i have created the corresponding update/ins/deletioncommands as well). am i working the incorrect way with the adapter? do have to call a method to fill the parameters? can anyone give me advise how to perfom an update?
thanks in advance
AU
_______
VS 2005
crlab mysql connector for NET2
-
- Posts: 7
- Joined: Tue 07 Aug 2007 10:00
its an mysqldataAdapter.
the grid is called gridControlCustomer and contains a gridView called gridCustomer and a GridCard called gridCardCustomer.
it is a winform applcation.
the grid is called gridControlCustomer and contains a gridView called gridCustomer and a GridCard called gridCardCustomer.
it is a winform applcation.
Last edited by artistunknown on Tue 07 Aug 2007 21:57, edited 1 time in total.
-
- Posts: 7
- Joined: Tue 07 Aug 2007 10:00
-
- Posts: 38
- Joined: Tue 07 Mar 2006 17:13
AU,
Try the following:
Assuming your grid is called gridControlCustomer and the primary gridview is called viewControlCustomer, *before* you call your CoreLab component Update method....
viewControlCustomer.CloseEditor() 'close any open DevX editor the user may have open
viewControlCustomer.UpdateFocusedRecord() 'flush any edits to the current record
BindingContext.Item(viewControlCustomer.DataSource).EndCurrentEdit() 'flush any cached edits from the grid control to the datasource
- Now try your update command on the CoreLab component and see if it works.
Hope this helps,
John
Try the following:
Assuming your grid is called gridControlCustomer and the primary gridview is called viewControlCustomer, *before* you call your CoreLab component Update method....
viewControlCustomer.CloseEditor() 'close any open DevX editor the user may have open
viewControlCustomer.UpdateFocusedRecord() 'flush any edits to the current record
BindingContext.Item(viewControlCustomer.DataSource).EndCurrentEdit() 'flush any cached edits from the grid control to the datasource
- Now try your update command on the CoreLab component and see if it works.
Hope this helps,
John
-
- Posts: 7
- Joined: Tue 07 Aug 2007 10:00
[email protected]
thanks sooo much, this works so far!
although i dont have a bindingcontext, there is just the adapter and the dataset at designtime visible...did you ment the bindingSourceComponent?
thanks sooo much, this works so far!
although i dont have a bindingcontext, there is just the adapter and the dataset at designtime visible...did you ment the bindingSourceComponent?
-
- Posts: 38
- Joined: Tue 07 Mar 2006 17:13
I don't use a "bindingcontext" in my app either. This is the issue I opened early this year with DevExpress about the same topic and what they suggested:
https://www.devexpress.com/Support/Cent ... id=CQ11260
Somewhere along the way I picked up that bindingcontext thing from another support suggestion and now use it without error. I have no idea if it causes any problems. Most likely its just redundant somehow.
jh
https://www.devexpress.com/Support/Cent ... id=CQ11260
Somewhere along the way I picked up that bindingcontext thing from another support suggestion and now use it without error. I have no idea if it causes any problems. Most likely its just redundant somehow.
jh
-
- Posts: 38
- Joined: Tue 07 Mar 2006 17:13
-
- Posts: 7
- Joined: Tue 07 Aug 2007 10:00
Hey Alexey!
yes ive solved the problem right now. as John suggested, everything works just fine right now, although i will try your solution - so thanks for your post.
actually im working with the schedulers...lets see if there is a stumbling block too
i now recognized, that your solution causes some problems with the scheduler when trying to map all requiered field. the needed binding source does not catch the datamember from the datatablecomponent. You cannot use the "." syntax in mapping the fields.
yes ive solved the problem right now. as John suggested, everything works just fine right now, although i will try your solution - so thanks for your post.
actually im working with the schedulers...lets see if there is a stumbling block too
i now recognized, that your solution causes some problems with the scheduler when trying to map all requiered field. the needed binding source does not catch the datamember from the datatablecomponent. You cannot use the "." syntax in mapping the fields.