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.v24.2.dll
Declaration
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);
}
Related GitHub Examples
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.