Editing datagrid item in a new (popup) window

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.
 
E

Eliyahu Goldin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top