Welcome Guest Search | Active Topics | Sign In | Register

Open and close from codebehind a dialog box Options
Martin
Posted: Wednesday, November 5, 2008 8:29:24 AM
Rank: Newbie
Groups: Member

Joined: 11/5/2008
Posts: 2
HI before purchasing a license I want to know how to lauch and close from codebehind (VB) a dialog. I want alose to know if it is possible to integrate into this dialog box a progresse bar then update it's progress form class progress input. Thanks for your support.
eo_support
Posted: Wednesday, November 5, 2008 8:41:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Martin,

You would set the dialog's InitialState property to open a dialog. The following code would open Dialog1:

Code: Visual Basic.NET
Dialog1.InitialState = EO.WebDialogState.Visible


You generally do not need to close a dialog from code behind because your code behind is executed when the page posts back, and the dialog automatically closes when postback occurs.

The dialog can also be opened/closed by client side JavaScript code. If you are interested in that, you can take a look of our samples, almost all the samples open/close the dialog with JavaScript code.

It is surely possible to put a ProgressBar inside the dialog. In fact you can put pretty much anything inside the dialog. Since the dialog and the progress bar are two independent controls, I would recommend you to play with them separately first. That way you can focus on one at a time. Once you are familiar with them both, you can start to put them together. If you have not used the ProgressBar control before, make sure you read the code comment in the "Server Side Task" sample, most people run into problems when they skip that. :)

Please feel free to let us know if you have any more questions.

Thanks
Rabih
Posted: Thursday, November 6, 2008 7:40:00 PM
Rank: Member
Groups: Member

Joined: 6/24/2007
Posts: 14
Hi, I have a question please,

Lets say i have many ASPX pages which are supposed to be different forms, and i need now to change these forms into a Essential Objects Dialogs:

1- How can I initiate my dialog during users' requests, i mean let say i am using a menu and i clicked a link which is supposed to open a new Dialog. and to note that each dialog was declared in a different ASPX page.

2- Can i use the same DialogID or can I change it from server side to open it more than once at a the same time? and every time with different data in?

What i am trying to do is to make my web application as much closer to MDI forms as possible.

Regards
Rabih
eo_support
Posted: Friday, November 7, 2008 6:20:59 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The dialog provides the following support:

1. Show dialog from code behind. You will do something like:

Dialog1.InitialState = EO.Web.DialogState.Visible;

2. Show hide dialog from client side. You will do something like:

eo_GetObject("Dialog1").show();

3. The ability to host a page inside a dialog. You will set the dialog's ContentUrl property;

Thanks
Martin
Posted: Sunday, November 9, 2008 9:33:13 AM
Rank: Newbie
Groups: Member

Joined: 11/5/2008
Posts: 2
HI, I am trying to apply a skin (App_Theme) to à Dialog. I tried to put int the skin file and it is not working. I do not find a way to define and apply a skin to eo controls :

<eo:Dialog runat="server" ID="BoxInfo"
HorizontalAlign= "center"
Height="100px"
Width="250px"
BackColor ="#47729F"
CloseEffect="Fade"
HeaderHtml="Info OLA"
></eo:Dialog>

Also, I was succesful to show and hid the contrôl programatically with a button. But with à Hyperlink i am not able to show the Dialog. I want to show it before th link is initiated.

Best regards,
eo_support
Posted: Sunday, November 9, 2008 4:56:42 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

In order to apply a theme, you need to set the Theme property of your page. It will be something like this:

Code: HTML/ASPX
<%@ Page ..... Theme="Theme1" %>


There are two ways to display a dialog:

1. Using a Button or a LinkButton control (I am not sure what you mean by HyperLink), then set the dialog's ShowButton to the Button or LinkButton's ID;

2. Using JavaScript. It will be something like this:

Code: HTML/ASPX
<a href="javascript:eo_GetObject('Dialog1').show();">show dialog</a>


Hope this helps.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.