Showing posts with label appears. Show all posts
Showing posts with label appears. Show all posts

Wednesday, March 28, 2012

Modal Popup awith datagrid

I m using Button click to show Datagrid.

When Button is clicked Modal popup appears showing updating as status for 4 secs..and side by side in server side Datagrid is filled.

Now the issue is that Modal up Appears for 4 sec but Datagrid is not displayed.

Query for Fetching the data from Database is running Fine and do bind the data to Data grid but grid is not displayed.

I have update Panel where i put Button (To be clicked),Update Progress and Modal Popup

I have not put Datagrid in Update Panel.

Can this be problem??

Yes you might be right. Try by putting the DataGrid inside the UpdatePanel. And for more details can you post your code, so that it will be easy to diagnolise the problem.


Hi Varun,

In your situation, when click on the Button which is inside the UpdatePanel , it will post all the elements back to the server and returns all to the client but only refresh the content which is inside the UpdatePanel. So you should put the DataGrid inside the UpdatePanel. My suggestion is when updating shows UpdateProgress and when it finished ,we force the ModalPopupExtender to be shown.The DataGrid is moved into the Panel which is associated with ModalPopupExtender.

For example:

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

function EndRequestHandler(sender, args){
$find("ModalPopupExtender's BehaviorID").show();

}

Best regards,

Jonathan

Monday, March 26, 2012

Modal popup is not modal

Hi!

My modal popup doesnt seem to be modal: see the code below. Everything works fine, but when popup appears link behind still can be clicked... What's missing?

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolkit" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <asp:Button ID="btnShowPopup" Text="ShowPopup" runat="server" /> <a href="http://www.google.com">Some link</a> <br /> <div id="divPopup" runat="server" style="background-color:Silver; width:500px; height:300px;"> <div id="divHeader" runat="server" style="background-color:Lime"> Header </div> <br /> Some popup content <br /> <asp:Button runat="server" ID="btnOK" Text="OK" /> </div> </div> <AjaxToolkit:ModalPopupExtender runat="server" ID="extPopup" TargetControlID="btnShowPopup" PopupControlID="divPopup" OkControlID="btnOK" PopupDragHandleControlID="divHeader" /> </form></body></html>

PawelRoman:

My modal popup doesnt seem to be modal: see the code below. Everything works fine, but when popup appears link behind still can be clicked... What's missing?

So your issue isn't with anything pertaining to the ModalPopupExtender, but rather with your CSS. Basically, you don't have any CSS. You need to set theBackgroundCssClass attribute on the ModalPopupExtender. Then, you'll need to add that CssClass using inline CSS or using a stylesheet. The CssClass must contain a background definition (background-color or background-image).

Saturday, March 24, 2012

Modal window underneath flash graphic

I have a popupmodal window that has quite a bit of info in it. It's the full lenght of the page, but it appears underneath the flash header that's at the top of the page, but over top everything else on the page. Here is the code for the flash file. Anyway to get the popup to be on top of the flash graphic?

<embedsrc="~images/top_banner.swf"width="100%"/>

Thanks!

Hi, you'll have to add a the wmode attribute to you html, because flash movies - by default - are drawn as topmost window objects in any browser.

The following html will do the trick:

<embedsrc="~images/top_banner.swf"width="100%"wmode="opaque"/>

--Victor


Perfect thanks!

Wednesday, March 21, 2012

ModalPanel - How can I us AJAX instead of postback to update database ?

I'm new to AJAX and this suite of tools. I have a page that when a user clicks a link button my ModalPanel with various input fields appears. When the user clicks the okay button I want to make an async call instead of having the page post back. I need to be able to call one of my business objects defined in C# so what is the best way to do this?

If you can provide details or even a small example I would appreciate it.

My code behind method looks like this:

void OnClick(...)

{

Broker b = new Broker();

b.name = NameTextBox.Text;

b.account = AccountTextBox.Text;

b.Save();


}

Why not just wrap the modalpopup in an updatepanel and let the page postback? It is easier then to have access to the server controls from the form and have full interaction with the other page elements during the postback in case you want to update other stuff on the page.

What benefits are you looking for by not posting back?

Jason

ModalPopup - Logic to databind control outside of modal

Hello All,

I am have a modal popup that appears and takes some input from a user. The user can then hit "submit" and logic behind the onclick for the submit button validates the input, and, if valid, submits that input to a database to be inserted.

this works great. I have update panels inside of the modal doing the work, and the user can submit as many entries as the want without the modal closing.

However, in the same method, after I update the database, I call another method to get new data from the database, and to re-databind the control they were looking at before the modal opened.

But the control (a listbox) does not change. It is not being databound. I even tried clearing the items from the listbox, and the items still remain.

I am not sure why the listbox is not updating from the logic. I would assume its not becuase the control is not in the same update panel, or the control is not in the modal popup. The listbox control is in its own update panel.

So I am trying to figure out how to make a control that is in another update panel, not in the modal popup update with logic triggered in the modal popup. I've thought about using the "onOKScript" in the modal popup properties to use some sort of JS to re-databind the control, but I am not sure how to do this.

Any ideas would be extreamly helpful

Thanks

-Shane

Hi Shane,

What you're describing should work. Code in an event handler invoked via oneUpdatePanel should be able to update controls in anotherUpdatePanel. Perhaps you can post a simple demo showing what's not working for you and we can take a look.

Thanks,
Ted

ModalPopUp & ValidatorCalloutExtender Issue

I have required fields that are contained within the ModalPopUp, the problem arises when I submit the form the validation popup appears behind the modal form.

Has anyone encountered this before and if so have they come up with a solution?

Help would be appreciated on this!!

This is a valid scenario and we have seen issues where it would be reasonable to not have the modal popup to have the highest z-index. If you could open an issue to track this that would be great:http://www.codeplex.com/AtlasControlToolkit/WorkItem/Create.aspx. We will investigate possible solutions to make your scenario and other similar scenarios regarding the modal popup z-index.

I am having the same issue.

Any help would be appreciated.


I'm having the same issue. I have a required validator in modal popup, but OK button on the ModalPopup control ignores that required validator.


asp.net_programmer:

I'm having the same issue. I have a required validator in modal popup, but OK button on the ModalPopup control ignores that required validator.

I opened anissue for this on Codeplex, hopefully someone can give us an answer for this soon. If not updated ModalPopup control, then some kind of workaround would be helpfull. Thanks.


Any update on this issue?

Thanks in Advance.


Well I don't know if this adds to this discussion or not. I can not no matter what get it to center. I have no idea why it will not but all I see is the lower left corner and cancel button of my popup in the upper right corner. So I figured I would specify the X and Y properties to possition it. So I specified X=250 and y=250 and this was the only change the modal was visible now but in possition maybe 50,50 however now it was not active and greyed out with the background. Remove the X and the Y and it goes back so I can only see the cancel button but it is active again.

Selam Aleyk,

If location of the validatorcalloutextender control is in modal popup panel, it is working ok.

Oznur