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.2.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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Init property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also