martes, 8 de marzo de 2016

C# - popup control devexpress

<head id="Head1" runat="server">
 <script type="text/javascript" language="javascript">

//muestra el popup
 function ShowPopUpCargaFacturas() {
            popUpFacturas.SetWindowContentHtml = '';
            popUpFacturas.Show();            popUpFacturas.SetContentUrl('../../../../Paginas/Compras/CargaFacturasCompra/PopUpCargaFactura.aspx');  //ruta del popup
            var titulo = 'Carga Facturas de Compra';
            popUpFacturas.SetHeaderText(titulo);
            centerPopup(800, 500);
        }

        function centerPopup(w, h) {
            var LeftValue = (screen.width - w) / 2;
            var TopValue = (screen.height - h) / 2;
            popUpFacturas.SetWidth(w);
            popUpFacturas.SetHeight(h);
            popUpFacturas.SetWindowLeft(LeftValue);
            popUpFacturas.SetWindowTop(TopValue);
            popUpFacturas.Hide();
            popUpFacturas.Show();
        }

  </script>
</head>

//popup contenedor.
 <dx:ASPxPopupControl ID="popUpFacturas" runat="server" HeaderText="Carga Facturas de Compra"
                Width="900px" ShowCloseButton="False" ClientInstanceName="popUpFacturas" Modal="True"
                PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="TopSides">
                <ContentCollection>
                    <dx:PopupControlContentControl ID="Popupcontrolcontentcontrol3" runat="server" Width="400px">
                    </dx:PopupControlContentControl>
                </ContentCollection>
            </dx:ASPxPopupControl>

2 comentarios: