G
Guest
I have a .Net 2 WinForm app which allow multi-windows to co-exist (in task
bar). They are all spawned from a main-form.
(i.e., Form A can start Forms B,C,D,E)
2 questions about call-backs
Question 1) Forms B,C,D contains DataGridView, which I need to make sortable
on multiple columns/fields (which is not a built in .Net functionality, I
believe). I need a new Modal dialog to be spawned from Forms B,C,D to allow
users to select sort fields and orders and then on closing the dialog, the
gridView in Forms B,C,D need to be refreshed with the new sort order selected
in the modal dialog.
What is the best way (of doing call-backs) from modal-Dialog X back to Forms
B,C,D?
Should I have
1) "Abstract" class MyDataGridForm with an abstract method called
ReSortGridView()
2) Have Forms B, C, D inherit from this abstract Form MyDataGridForm?
3) Define the Modal Sort selection dialog's constructor as taking in
MyDataGridForm as a parameter?
Any better ways of doing this?
Question 2) Ideally, it would be nice that for every new Form spawned off, a
"Window" navigation menuitem is added. So each form would need a "handle" on
to all forms spawned. What is the best way of doing this?
bar). They are all spawned from a main-form.
(i.e., Form A can start Forms B,C,D,E)
2 questions about call-backs
Question 1) Forms B,C,D contains DataGridView, which I need to make sortable
on multiple columns/fields (which is not a built in .Net functionality, I
believe). I need a new Modal dialog to be spawned from Forms B,C,D to allow
users to select sort fields and orders and then on closing the dialog, the
gridView in Forms B,C,D need to be refreshed with the new sort order selected
in the modal dialog.
What is the best way (of doing call-backs) from modal-Dialog X back to Forms
B,C,D?
Should I have
1) "Abstract" class MyDataGridForm with an abstract method called
ReSortGridView()
2) Have Forms B, C, D inherit from this abstract Form MyDataGridForm?
3) Define the Modal Sort selection dialog's constructor as taking in
MyDataGridForm as a parameter?
Any better ways of doing this?
Question 2) Ideally, it would be nice that for every new Form spawned off, a
"Window" navigation menuitem is added. So each form would need a "handle" on
to all forms spawned. What is the best way of doing this?