Back to Devexpress

ASPxGantt.CustomCallback Event

aspnet-devexpress-dot-web-dot-aspxgantt-dot-aspxgantt-142b0402.md

latest3.1 KB
Original Source

ASPxGantt.CustomCallback Event

Fires when the client ASPxClientGantt.PerformCallback method initiates a round trip to the server.

Namespace : DevExpress.Web.ASPxGantt

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

NuGet Package : DevExpress.Web

Declaration

csharp
public event GanttCustomCallbackEventHandler CustomCallback
vb
Public Event CustomCallback As GanttCustomCallbackEventHandler

Event Data

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

PropertyDescription
ArgumentReturns string information passed from the client-side (if any).

Remarks

The CustomCallback event allows you to perform server-side actions in response to a call to the client PerformCallback method.

Use the event parameter’s Argument property to get information passed from the client-side with the PerformCallback method’s args parameter.

Note that you can additionally handle the client BeginCallback and EndCallback events to perform actions before and after callback processing.

The following example shows how to pass a clicked task’s key value to the CustomCallback event handler:

aspx
<script type="text/javascript">
    function onClickTask(s, e) {
        clientGantt.PerformCallback(e.key);
    }
</script>

<dx:ASPxGantt ID="Gantt" runat="server" ClientInstanceName="clientGantt" OnCustomCallback="Gantt_CustomCallback" ...>
    <!--...-->
</dx:ASPxGantt>
csharp
protected void Gantt_CustomCallback(object sender, DevExpress.Web.ASPxGantt.GanttCustomCallbackEventArgs e){
    string key = e.Argument;
    //...
}
vb
Protected Sub Gantt_CustomCallback(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGantt.GanttCustomCallbackEventArgs)
    Dim key As String = e.Argument
    '...
End Sub

See Also

Callbacks

BeginCallback

EndCallback

ASPxGantt Class

ASPxGantt Members

DevExpress.Web.ASPxGantt Namespace