All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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

Declaration

public event GanttCustomJSPropertiesEventHandler CustomJSProperties
Public Event CustomJSProperties As GanttCustomJSPropertiesEventHandler

Event Data

The CustomJSProperties event handler receives an argument of the GanttCustomJSPropertiesEventArgs type. The following properties provide information specific to this event.

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

Remarks

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.

Example

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" />
    // ...    
    <WorkTimeRules>
        <dx:DailyRule>
            <WorkTimeRanges>
                <dx:WorkTimeRange Start="08:00" End="11:55" />
                <dx:WorkTimeRange Start="13:00" End="17:00" />
            </WorkTimeRanges>
        </dx:DailyRule>
    </WorkTimeRules>
</dx:ASPxGantt>

Online Demo

ASPxGantt - Work Time Schedule

See Also