I have a gridview on a separate form that has an edit button. When clicked, the listing form closes and the edit form opens.
Edit form has 5 fields, 4 textboxes and 1 combobox, each are bound to the relevent column in the strongly typed dataset that I added to the form. The data is bound to the controls fine, I'm just missing something to update the changes to the database.
Not exactly sure why the records not getting updated with the below code...I'm missing something, can anyone help?
|
Any thoughts?
Thanks,
Frank
frankPosted Dec 23, 2009, 6:26 PM
CurrencyManager cm = (CurrencyManager)this.BindingContext[residenceMasterBindingSource];
cm.EndCurrentEdit();
And then do the update command it updates the record. No clue yet as to what that is or what exactly it's supposed to do yet, but I'll get back to it.
Currently now trying to figure out how to keep all the forms in the main MDI container.
I can do it with any window I call from the form (ie, forms I call from my dropdown menu located on that form) but what I "need" to do is do it even with forms opened from the child window. IE, I have a frmMain with a dropdown button to list the units defined using a datagridview. Each row has an "edit" button that when clicked, opens opens a form that is databound (I didnt like doing the edit/add thats built into the gridview...seemed kludgey). So now I'm looking to find out how to do this:
frmMain(mdiform) - Opens frmListUnits when menu item is clicked.
Then if edit/add new buttons are clicked, open another form with the fields and and/edit buttons to save the data.
So what I want is frmUnitsAdd and frmUnitsEdit to open in the MDI page frmMain even though they weren't called by that page.
Wish me luck :)
Thanks
Frank
bradPosted Dec 23, 2009, 6:15 PM
Can you post all of your code?