Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
i can't obtain id of WebDialogWindow in Initialize event, windowstate is hidden
posted

I have a WebDialogWindow which initial i don't want to be visible so i setted the windowstate property to hidden, i have a button when i press i want to open WebDialogWindow clientside using Click event of button with a handler similar with this:

function WebImageButton1_MouseDown(){var dialog = $find(wdwid);

dialog.show();

return false;

}

because i use master content page the ID wich i assigned to WebDialogWindow in designer is not the same with the id assigned by container in generated page onclient in consequence i can't use the ID assigned in designer to show window. I try to obtain and save the id of WebDialogWindow in Initialize event

var wdwID

function Initialize(sender, args){

wdwID = sender.get_id();

}

but this event is firred work only if the initial WindowState isn't Hidden, i have tried set initial WindowState = Normal and to hide it in Initialize event but you can observe how appear and dissapear the WebDialogWindow

Infragistics used

<%@ Register Assembly="Infragistics2.WebUI.Misc.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"

Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>

Parents
No Data
Reply
  • 28464
    posted

    Indeed, if the control is nested inside other controls implementing INamingContainer, such as MasterPages / User Controls / Templates, etc, the server-side ID is different from the client-side ID (ClientID). You need to use the client-side ID on the client with javascript, so you can use the following javascript construct:

     

    var dialog = $find(<%= wdwid.ClientID %>);

Children
No Data