formview edit issue

J

JohnE

I have a gridview (master) that when a linkbutton is used it opens the
formview (detail) for the record. It is all working. The linkbutton opens a
showModalDialog rather then the modalpopupextender.

function ShowChangeRequestDetail(ChangeRequestID)
{
window.showModalDialog("ProteusListDetailView.aspx?ChangeRequestID="
+ ChangeRequestID, "",
"dialogWidth:700px; dialogHeight:500px; resizable:no;
scrollbars:no");
}

As mentioned, it all works like it should.

The issue is when I use the Edit button on the formview it opens another
window with all the internet webpage controls on it (favorites, menus, etc).
Plus the window is almost the size of the screen. What is controlling the
Edit button was done when the formview was created. Both of these are not
acceptable for the users. How do I go about controlling the window that the
Edit button (not linkbutton) opens up for editing? Any examples, samples,
links are welcomed.

Thanks... John
 
J

JohnE

Mark Rae said:
But in IE only!

showModalDialog is *COMPLETELY* non-standard and should be avoided at all
costs. As it stands, your app is not cross-browser compliant...
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=showModalDialog+cross+browser

The AJAX modal popup extender is designed specifically to get round this
problem...

I guess what I did is a no-no. I tried the modalpopupextender but couldn't
get it to work properly. Saw there was a function in one of the articles
with a work around to the cross brower as well as other methods. Will
bookmark this google search and go back to the modal to try it again.

Any suggestions since what I have is working (other then the edit) to keep
the repair time down?
 
J

JohnE

Mark Rae said:
Not while you continue to use showModalDialog...

And if I vacate the showModalDialog (which I probably will be doing) what
suggestions do you have?
 
J

JohnE

Mark Rae said:
Use the AJAX modal popup extender.

Ok. I started moving to the modalpopupextender. Now, there is a linkbutton
in the gridview that is to be used to open the modal. Here is what the
linkbutton has in it;

<asp:LinkButton ID="lbtnChangeRequestDetailView"
runat="server"
ForeColor="Black"
Text='<%#
DataBinder.Eval(Container.DataItem,"ChangeRequestID") %>' >
</asp:LinkButton>

This linkbutton is also the holder of the ID of the record so it needs to
pass it to the modal. This linkbutton was what opened the showModalDialog.
The formview is bound by sqldatasource. What (and how) should I use to open
the modal from the linkbutton with? You have an example?
 
J

JohnE

Mark Rae said:

I have been working on this most of the day reverting back to using the
modalpopupextender and I am not having any luck or success in getting this to
work properly. Which I ran into before. Frustration is running ramped. I
have googled and read what you linked (and other articles from there) and it
still isn't working. When I go to run it, the modal is there, but is as
blank as the look on my face.

For now I have gone back to the window.open (not the showModalDialog). It
opens a window with the information and it moves to edit, insert, etc just
like the users want it to. Unforturnately, it is not modal (unless you have
a way of making it so). We'll just need to live with that until I take
another stab at the modal extender.

Thanks...John
 
M

Mark Rae [MVP]

still isn't working. When I go to run it, the modal is there, but is as
blank as the look on my face.

Presumably, the Panel that you've specified to be the PopupControlID does
actually contain an UpdatePanel which itself contains controls? E.g. in this
example: http://msdn.microsoft.com/en-us/magazine/cc164247.aspx that would
be pnlEditCustomer...

Also, I'm assuming that you haven't disabled JavaScript...?

For now I have gone back to the window.open (not the showModalDialog). It
opens a window with the information and it moves to edit, insert, etc just
like the users want it to. Unforturnately, it is not modal (unless you
have
a way of making it so).

There's no way that I know of to make an ordinary window modal...
 
J

JohnE

Mark Rae said:
Presumably, the Panel that you've specified to be the PopupControlID does
actually contain an UpdatePanel which itself contains controls? E.g. in this
example: http://msdn.microsoft.com/en-us/magazine/cc164247.aspx that would
be pnlEditCustomer...

Also, I'm assuming that you haven't disabled JavaScript...?



There's no way that I know of to make an ordinary window modal...

Javascript is on as it is used elsewhere. Not giving up on the modal way as
that is the way to go. At least I have it working one way. But I already
have visions of many unclosed windows. Going to put this aside for a couple
day, let the head clear, and try it again. I still think I can get the modal
to work.
 
M

Mark Rae [MVP]

I still think I can get the modal to work.

I would suggest you create a scratch web application project with just one
page, one button and a modal popup. Pick one of the hundreds of examples on
the web just to reassure yourself that you can actually get this working.
 

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,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top