Rank: Advanced Member Groups: Member
Joined: 11/13/2008 Posts: 43
|
Hi,
Supposing I'm using an eo:Dialog to edit some data but, when the page initially loads, I don't necessarily know what that data is. Therefore, I can't populate the eo:Dialog when the page first loads. Instead, I want to fetch a record from a server-side database when the eo:Dialog is shown.
Is there a built-in method for this, or will I have to write my own AJAX function?
Thanks,
Mark
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, The standard approach for this is to use a Button control (or whatever other server control), then handle the Button's Click event and show the dialog by setting the Dialog's InitialState property:
Code: C#
private void Button1_Click(object sender, EventArgs e)
{
//Load dialog data....
......
//Show the dialog
Dialog1.InitialState = EO.Web.DialogState.Visible;
}
Whether you would like to use AJAX for this is up to you. You can either use our CallbackPanel or ASP.NET UpdatePanel for that. You would need to put the dialog inside the CallbackPanel/UpdatePanel, then set the button as a trigger. Hope this helps. Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 11/13/2008 Posts: 43
|
eo_support wrote:Whether you would like to use AJAX for this is up to you. You can either use our CallbackPanel or ASP.NET UpdatePanel for that. You would need to put the dialog inside the CallbackPanel/UpdatePanel, then set the button as a trigger. Excellent response - just what I was looking for. Thanks very much.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
You are very welcome!
|