Skip to main content
Tab

ClientSideEvents.Init Property

Gets or sets the name of the JavaScript function or the entire code which will handle a web control’s ASPxClientControlBase.Init client-side event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue("")]
public virtual string Init { get; set; }

Property Value

Type Default Description
String String.Empty

A string that represents either the name of a JavaScript function or the entire JavaScript function code used to handle an event.

Remarks

The example below demonstrates how to adjust the Grid View‘s height during initialization:

<dx:ASPxGridView runat="server" ID="gridView" ClientInstanceName="grid" Width="100%" DataSourceID="ds">
    <!-- ... --->
    <ClientSideEvents Init="OnInit" />
</dx:ASPxGridView>
function OnInit(s, e) {
    AdjustSize();
}
function AdjustSize() {
    var height = Math.max(0, document.documentElement.clientHeight);
    grid.SetHeight(height);
}

View Example: Grid View for ASP.NET Web Forms - How to display the Grid View in full screen mode View Example: Grid View for ASP.NET MVC - How to display the Grid View in full screen mode

See Also