Skip to main content

ASPxGantt.CustomJSProperties Event

Enables you to supply any server data that can then be parsed on the client.

Namespace: DevExpress.Web.ASPxGantt

Assembly: DevExpress.Web.ASPxGantt.v23.2.dll

NuGet Package: DevExpress.Web


public event GanttCustomJSPropertiesEventHandler CustomJSProperties

Event Data

The CustomJSProperties event's data class is GanttCustomJSPropertiesEventArgs. The following properties provide information specific to this event:

Property Description
Properties Gets a collection of temporary client properties. Inherited from CustomJSPropertiesEventArgs.


In some instances, it is necessary to obtain server information on the client. The CustomJSProperties event enables you to declare temporary client properties. These properties can hold arrays, hashtables, etc. Once declared, a property can be accessed on the client.

To add new properties, use the event parameter’s Properties property, which represents a collection of property names and their values. The only requirement is that property names must begin with the ‘cp’ prefix, to avoid rewriting the ASPxGantt base properties.


The following example illustrates how to use the CustomJSProperties event to pass information about daily rules in the Gantt from the server to the client side. On the client, this information is set as a label’s text.

The result:

Working hours: from 08:00 till 11:55 AND from 13:00 till 17:00

<span>Working hours: </span>
<dx:ASPxLabel runat="server" ID="DailyRules" Text="" ClientInstanceName="dailyRulesLabels" />

<dx:ASPxGantt ID="Gantt" runat="server" OnCustomJSProperties="Gantt_CustomJSProperties" ... >
    <ClientSideEvents Init="OnGanttViewInit" />
    // ...    
                <dx:WorkTimeRange Start="08:00" End="11:55" />
                <dx:WorkTimeRange Start="13:00" End="17:00" />

Online Demo

ASPxGantt - Work Time Schedule

See Also