ShowDialog()

  • Thread starter Thread starter Peter Morris [Droopy Eyes Software]
  • Start date Start date
P

Peter Morris [Droopy Eyes Software]

Hi all

In a win32 app I quite often have the following scenario.

1) User is entering data on a form (purchase order for example)
2) Half way down the form there is an entry required for a related table
(Customer)
3) User clicks a [...] button next to the entry to select the customer.
4) A SelectCustomer form is shown modally.
5) When the modal form closes the original form gets the ID selected in it

How would I do this in ASP.NET? The original form shouldn't lose its
entries otherwise the user would get very annoyed.

--

Pete
=============
Read or write technical articles
http://www.HowToDoThings.com

Audio compression components, FastStrings library, DIB controls
http://www.DroopyEyes.com
 
Hi Pete
you can achieve this by opening a modal window from a
javascript call in the parent
window.showModalDialog()
make sure you pass the parent window (eg 'this') as the
second argument to this call, it allows you to refer to
the parent window's functions from the modal window.
So when the modal window has performed its processing you
can refer to the parent using
window.dialogArguments.[parent function/object]

using this technique you should be able to open a modal
window containing a dropdownlist, then close the window
and update the parent once the user makes a selection.

alex
 
Hi Alex, thanks for your answer.

Do you know of an example of this technique anywhere? An article or
something?

Cheers

Pete
 
Back
Top