How I crete a WebDialogWindow dynamically?
I try code:
Dim Dialog As New Infragistics.Web.UI.LayoutControls.WebDialogWindow() Dim L As New Label L.Text = "DESEJA REALMENTE SAIR?" With Dialog .Modal = True .ContentPane.Controls.Add(L) .Moveable = True .Header.CaptionText = "Teste Caption" .InitialLocation = Infragistics.Web.UI.LayoutControls.DialogWindowPosition.Centered .WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Normal .Visible = True .DataBind() End With Me.Controls.Add(Dialog)
I'm not sure what the context of Me is here, but if it's the Page, then you have to add it to Me.Form. All controls need to be added to the form element, not directly to the page. If Me is another container control, just be sure that you're adding that control to the Form element.
Hope this helps,
-Tony
Hi,
I working with Page "child" of the a MasterPage. Then this page is CADASTROFORNECEDOR.ASPX where masterpage is MP_CADASTRO.master. The code is present in event click on button in CADASTROFORNECEDOR.ASPX.
I try
Dim Dialog As New Infragistics.Web.UI.LayoutControls.WebDialogWindow() Dim L As New Label L.Text = "DESEJA REALMENTE SAIR?" With Dialog .Modal = True .ContentPane.Controls.Add(L) .Moveable = True .Header.CaptionText = "Teste Caption" .InitialLocation = Infragistics.Web.UI.LayoutControls.DialogWindowPosition.Centered .WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Normal .Visible = True End With Me.Form.Controls.Add(Dialog)
But nothing happened.
I would still suggest you try putting in a Placeholder control to see if that helps. I've seen issues in the past with just adding the the form controls collection.