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
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);
}
See Also