| |

VerySource

 Forgot password?
 Register
Search
View: 1017|Reply: 4

How to prompt to save the changed data in the subform when closing the MDI form?

[Copy link]

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-3-6 15:00:02
| Show all posts |Read mode
Ask you heroes, how to prompt to save the changed data in the subform when closing the MDI form? For example, there is a datagridview control in the subform form2, and the data has been modified, if you click the close button in the title bar of the parent form , Prompt: The data change is not saved, do you want to save it?
Reply

Use magic Report

0

Threads

48

Posts

30.00

Credits

Newbie

Rank: 1

Credits
30.00

 Invalid IP Address

Post time: 2021-3-6 16:15:01
| Show all posts
Simply, write code in the closing event of the subform
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2021-3-6 16:30:02
| Show all posts
You can write event code in the main form
addHandler SubForm.Closing addressof procedure name
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-3-6 16:45:01
| Show all posts
The idea is to process some things before the subform is closed. The method is to write some processing code before the form is closed in the closing event of the subform.
Reply

Use magic Report

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2021-3-6 17:00:02
| Show all posts
Very correct, thank you everyone!!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list