datagrid loses user entries

S

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.
 
S

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
 
S

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.
 

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