Question mdi within mdi?

witecloner

Well-known member
Joined
Feb 12, 2009
Messages
45
Programming Experience
Beginner
Hi all, i have some problem need to solved. I want to create multiple mdi form. Which mdi form (mdi parent) container mdi child (for level 1), and mdi child also have mdi child again (for level 2). how to code it :confused:?

I also want to ask one question again. I have 2 form. which first form is using for displaying data (i use datagridview to do that), and another form is using to inserting data. let's assume i want to inserting data, if i click the button save (the data will be saved into table, ok this no problem ;)), but i want it will take effect too in first form, which that datagridview will directly display new data field which i insert it. how to do it :confused:?

thank you
 
No can't do, "Form cannot be both an MDI child and MDI parent."
 
To answer just the second part of your question, if both forms are bound to the same datatable/dataset, the new record will be seen in form1 when you add a record in form2.
 
To answer just the second part of your question, if both forms are bound to the same datatable/dataset, the new record will be seen in form1 when you add a record in form2.

yes you are right. But it's not directly change it. I must to close the form1 first and open it again to see that new record (and other solution i must put refresh button on form1 to refresh that form if i want to see new record on the datagridview, but i don't want to put refresh button on form1). But my problem is not that. I want it change directly when i push button save in form2 without closing again form1 or place button refresh on form1 to see that new record. tq
 
Not sure how your coding it but if the dataset is declared globally, the newly added record will be seen by all forms instantly as soon as its added. I'm seeing the new record being displayed in Form1 & Form2 even before I close Form2.

Attached is a working example
 

Attachments

  • GlobalDataset.zip
    38.4 KB · Views: 31
Last edited:

Latest posts

Back
Top