aspnet-js-aspxclientcontrolbase.md
Occurs on the client side after the control has been initialized.
Init: ASPxClientEvent<ASPxClientEventHandler<ASPxClientControlBase>>
The Init event's data class is ASPxClientEventArgs.
Write a handler for the Init event to perform specific operations after the control’s client object has been completely initialized on the client side.
This example demonstrates how to resize the ASPxPageControl control to occupy the entire browser window (a Full Screen mode).
View Example: How to display the page control in full screen mode (100% width and height)
function OnInit(s, e) {
AdjustSize();
ASPxClientUtils.AttachEventToElement(window, "resize", function(evt) {
AdjustSize();
});
}
function AdjustSize() {
var height = document.documentElement.clientHeight;
pc.SetHeight(height);
}
<style type="text/css">
body, html
{
padding: 0;
margin: 0;
}
</style>
<dx:ASPxPageControl ID="pc" runat="server" Height="100px" Width="100%" ClientInstanceName="pc" >
<Paddings Padding="0px" />
<!-- ... -->
<ClientSideEvents Init="OnInit" />
</dx:ASPxPageControl>
See Also