Datagrid loses user entries
(Saturday, September 18, 2004)
Found the following interesting discussion in the Newsgroups:
datagrid loses user entries by:Sean Foley
| I have a MDI parent (basically a menu) and a MDI child (data form with datagrid). When i close the parent and the datagrid has been changed i ask the user if they wish to save changes made in the grid
The save routine that i have on the MDI child accessed via a button on the form saves all data entered including the active cell which is that active control a datagridtextbox
when i call my save routine in the child form from the parent form, i lose the data entered if the user did not move off of the edited row of a datagrid?
I have tried many things and think that it is not activating the lostfocus event of the row, grid or whatever.
Don't know what else to try.
| | | Reply: by:Sean Foley
| | | Basically the currency manager itemschanged event is not kicking off. I used the currency manager to kickoff the positionchanged event.
Need to accomplish clicking to a different datagrid row programmatically? which kicks off both positionchanged and itemchanged events.
ANY HELP GREATLY APPRECIATED
| | | Reply: by:Sean Foley
| | | okay, solution found :)
Dim myBindingManager As BindingManagerBase = BindingContext(myDataSet, "mydatatable")
myBindingManager.SuspendBinding()
myBindingManager.ResumeBinding()
Only problem now, is if the user does not move off the current cell that one entry is lost. At least the row on an insert or on an update with cells is not lost than where the cursor is, is not lost.
|
Posted by Xander Zelders

|
0 Comments:
Post a Comment
<< Home