Editing datagrid item in a new (popup) window

  • Thread starter Thread starter Rob Petersen
  • Start date Start date
R

Rob Petersen

I have a datagrid with an Edit/Update column. Instead of editing records "in
place" I'd like to do so in a separate popup window because there is a lot
of validation, business rules and dynamic controls.

What is the best way to launch a popup window (preferably modal) and then
refresh the parent datagrid if the user presses a "Save and Close" button in
the popup?

Are there any caveats regarding popup security or updating a parent grid
using client-side script?

Thanks.
 
To open a popup window you have to use javascript showModalDialog call on
client-side. After the popup is done, you can submit the parent form with
form.submit(). Again, it's on the client. You can get the popup to pass you
a value back in window.returnValue property. You might want to check the
return value to find out whether the popup saved or canceled it's form.

To answer your last question, there are no security issues involved, except
some developers still worry about users with no javascript support. I am not
sure if anyone in these days has javascript disabled. You can't do much
without javascript anyway.

Eliyahu
 
Back
Top