Skip to content

Commit 31540ab

Browse files
committed
docs(gantt): add R2 2021 introduced client events
1 parent 348ae98 commit 31540ab

20 files changed

+547
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: OnClientInserting
3+
page_title: OnClientInserting - RadGantt
4+
description: Check our Web Forms article about OnClientInserting.
5+
slug: gantt/client-side-programming/events/onclientinserting
6+
tags:
7+
published: True
8+
position: 3
9+
---
10+
11+
# OnClientInserting
12+
13+
14+
The **OnClientInserting** occurs when a new task or a new dependency is about to be added. The event can be canceled. The equivalent of the underlying Kendo UI Gantt [add event](https://docs.telerik.com/kendo-ui/api/javascript/ui/gantt/events/add).
15+
16+
The event handler receives two parameters:
17+
18+
1. The instance of the **Gantt** control firing the event.
19+
20+
2. An **eventArgs** parameter containing the following methods:
21+
22+
* **get_task** returns the GanttTask instance which will be added to the DataSource.
23+
24+
* **set_cancel** lets you cancel the event and prevent the inserting.
25+
26+
* **get_cancel** returns **true** if the event has been canceled.
27+
28+
* **dependency** returns the GanttDependency instance which will be added to the DataSource.
29+
30+
* **get_sender** returns the underlying Kendo UI Gantt widget that fired the event.
31+
32+
````ASP.NET
33+
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientInserting="OnClientInserting">
34+
</telerik:RadGantt>
35+
````
36+
37+
````JavaScript
38+
function OnClientInserting(sender, eventArgs) {
39+
// cancel the event
40+
args.set_cancel(true);
41+
}
42+
````
43+
44+
# See Also
45+
46+
* [Client-Side Basics]({%slug gantt/client-side-programming/overview%})
47+
48+
* [Client-Side Events]({%slug gantt/client-side-programming/events/overview%})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: OnClientKendoWidgetInitializing
3+
page_title: OnClientKendoWidgetInitializing - RadGantt
4+
description: Check our Web Forms article about OnClientKendoWidgetInitializing.
5+
slug: gantt/client-side-programming/events/onclientkendowidgetinitializing
6+
tags: onclientkendowidgetinitializing
7+
published: True
8+
position: 1
9+
---
10+
11+
# OnClientKendoWidgetInitializing
12+
13+
##
14+
15+
The **OnClientKendoWidgetInitializing** occurs just before the Kendo Widget is initialized. The arguments are the options object that will be passed to the underlying [Kendo UI Gantt](https://docs.telerik.com/kendo-ui/api/javascript/ui/gantt) constructor.
16+
17+
The event handler receives two parameters:
18+
19+
1. The instance of the **Gantt** control firing the event.
20+
21+
1. An **eventArgs** parameter that represents the options object that will be passed to the Kendo UI Gantt constructor
22+
23+
````ASP.NET
24+
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientKendoWidgetInitializing="OnClientKendoWidgetInitializing">
25+
</telerik:RadGantt>
26+
````
27+
28+
````JavaScript
29+
function OnClientKendoWidgetInitializing(sender, eventArgs) {
30+
var options = eventArgs;
31+
// change the options object passed to .kendoGantt() method
32+
// https://docs.telerik.com/kendo-ui/api/javascript/ui/gantt
33+
}
34+
````
35+
36+
# See Also
37+
38+
* [Client-Side Basics]({%slug gantt/client-side-programming/overview%})
39+
40+
* [Client-Side Events]({%slug gantt/client-side-programming/events/overview%})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: OnClientLoad
3+
page_title: OnClientLoad - RadGantt
4+
description: Check our Web Forms article about OnClientLoad.
5+
slug: gantt/client-side-programming/events/onclientload
6+
tags: onclientload
7+
published: True
8+
position: 2
9+
---
10+
11+
# OnClientLoad
12+
13+
14+
The **OnClientLoad** occurs when control's client-side object is initialized as well as the underlying Kendo UI Widget.
15+
16+
The event handler receives one parameter:
17+
18+
1. The instance of the **Gantt** control firing the event.
19+
20+
21+
````ASP.NET
22+
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientLoad="OnClientLoad">
23+
</telerik:RadGantt>
24+
````
25+
26+
````JavaScript
27+
function OnClientLoad(sender) {
28+
var gantt = sender;
29+
}
30+
````
31+
32+
# See Also
33+
34+
* [Client-Side Basics]({%slug gantt/client-side-programming/overview%})
35+
36+
* [Client-Side Events]({%slug gantt/client-side-programming/events/overview%})

controls/gantt/client-side-programming/events/onclientnavigationcommand.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Check our Web Forms article about OnClientNavigationCommand.
55
slug: gantt/client-side-programming/events/onclientnavigationcommand
66
tags: onclientnavigationcommand
77
published: True
8-
position: 8
8+
position: 18
99
---
1010

1111
# OnClientNavigationCommand
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: OnClientRemoving
3+
page_title: OnClientRemoving - RadGantt
4+
description: Check our Web Forms article about OnClientRemoving.
5+
slug: gantt/client-side-programming/events/onclientremoving
6+
tags: onclientremoving
7+
published: True
8+
position: 4
9+
---
10+
11+
12+
# OnClientRemoving
13+
14+
15+
The **OnClientRemoving** occurs when a task or a dependency is about to be removed. The event can be canceled. The equivalent of the underlying Kendo UI Gantt [remove event](https://docs.telerik.com/kendo-ui/api/javascript/ui/gantt/events/remove).
16+
17+
The event handler receives two parameters:
18+
19+
1. The instance of the **Gantt** control firing the event.
20+
21+
2. An **eventArgs** parameter containing the following methods:
22+
23+
* **get_task** returns the GanttTask instance which is being removed from the DataSource.
24+
25+
* **set_cancel** lets you cancel the event and prevent the inserting.
26+
27+
* **get_cancel** returns **true** if the event has been canceled.
28+
29+
* **dependencies** returns an array of GanttDependency instances which are associated with the task being removed, or an array with a single dependency which is being removed.
30+
31+
* **get_sender** returns the underlying Kendo UI Gantt widget that fired the event.
32+
33+
````ASP.NET
34+
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientRemoving="OnClientRemoving">
35+
</telerik:RadGantt>
36+
````
37+
38+
````JavaScript
39+
function OnClientRemoving(sender, eventArgs) {
40+
// cancel the event
41+
args.set_cancel(true);
42+
}
43+
````
44+
45+
# See Also
46+
47+
* [Client-Side Basics]({%slug gantt/client-side-programming/overview%})
48+
49+
* [Client-Side Events]({%slug gantt/client-side-programming/events/overview%})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: OnClientRequestEnd
3+
page_title: OnClientRequestEnd - RadGantt
4+
description: Check our Web Forms article about OnClientRequestEnd.
5+
slug: gantt/client-side-programming/events/onclientrequestend
6+
tags: onclientrequestend
7+
published: True
8+
position: 9
9+
---
10+
11+
12+
# OnClientRequestEnd
13+
14+
15+
The **OnClientRequestEnd** occurs when a response from the Web Service is received. The event is raised only when the Gantt is bound to a Web Service and is raised for every request sent to the service, including all CRUD operations on tasks, dependencies, resources and assignments.
16+
17+
The event is equivalent to the Kendo UI DataSource [requestEnd event](https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/events/requestend).
18+
19+
The event handler receives two parameters:
20+
21+
1. The instance of the Gantt control firing the event.
22+
23+
2. An **eventArgs** parameter containing the following methods:
24+
25+
* **get_type** returns the type of the request. Possible options are `create`, `read`, `update` and `destroy`.
26+
27+
* **get_response** returns the raw remote service response.
28+
29+
* **get_sender** returns the data source instance which fired the event.
30+
31+
32+
33+
````ASP.NET
34+
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientRequestEnd="OnClientRequestEnd">
35+
</telerik:RadGantt>
36+
````
37+
38+
````JavaScript
39+
function OnClientRequestEnd(sender, eventArgs) {
40+
var response = eventArgs.get_response();
41+
}
42+
````
43+
44+
45+
46+
# See Also
47+
48+
* [Client-Side Basics]({%slug gantt/client-side-programming/overview%})
49+
50+
* [Client-Side Events]({%slug gantt/client-side-programming/events/overview%})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: OnClientRequestFailed
3+
page_title: OnClientRequestFailed - RadGantt
4+
description: Check our Web Forms article about OnClientRequestFailed.
5+
slug: gantt/client-side-programming/events/onclientrequestfailed
6+
tags: onclientrequestfailed
7+
published: True
8+
position: 10
9+
---
10+
11+
12+
# OnClientRequestFailed
13+
14+
15+
The **OnClientRequestFailed** occurs when a request to the remote service fails. The event is raised only when the Gantt is bound to a Web Service and is raised for every failed request sent to the service, including all CRUD operations on tasks, dependencies, resources and assignments.
16+
17+
The event is equivalent to the Kendo UI DataSource [error event](https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/events/error).
18+
19+
The event handler receives two parameters:
20+
21+
1. The instance of the Gantt control firing the event.
22+
23+
2. An **eventArgs** parameter containing the following methods:
24+
25+
* **get_errorThrown** returns the exception if there is such.
26+
27+
* **get_status** returns a string describing the type of the error.
28+
29+
* **get_xhr** returns the current [jqXHR](https://api.jquery.com/Types/#jqXHR).
30+
31+
* **get_sender** returns the data source instance which fired the event.
32+
33+
34+
35+
````ASP.NET
36+
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientRequestFailed="OnClientRequestFailed">
37+
</telerik:RadGantt>
38+
````
39+
40+
````JavaScript
41+
function OnClientRequestFailed(sender, eventArgs) {
42+
var status = eventArgs.get_status();
43+
}
44+
````
45+
46+
47+
48+
# See Also
49+
50+
* [Client-Side Basics]({%slug gantt/client-side-programming/overview%})
51+
52+
* [Client-Side Events]({%slug gantt/client-side-programming/events/overview%})

controls/gantt/client-side-programming/events/onclientrequeststart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Check our Web Forms article about OnClientRequestStart.
55
slug: gantt/client-side-programming/events/onclientrequeststart
66
tags: onclientrequeststart
77
published: True
8-
position: 1
8+
position: 8
99
---
1010

1111
# OnClientRequestStart
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: OnClientTaskEditing
3+
page_title: OnClientTaskEditing - RadGantt
4+
description: Check our Web Forms article about OnClientTaskEditing.
5+
slug: gantt/client-side-programming/events/onclienttaskediting
6+
tags: onclienttaskediting
7+
published: True
8+
position: 5
9+
---
10+
11+
# OnClientTaskEditing
12+
13+
##
14+
15+
The **OnClientTaskEditing** occurs when the user starts task edit upon double click on a cell or a task element. Event can be canceled. The equivalent of Kendo UI Gantt [edit event](https://docs.telerik.com/kendo-ui/api/javascript/ui/gantt/events/edit).
16+
17+
18+
The event handler receives two parameters:
19+
20+
1. The instance of the **Gantt** control firing the event.
21+
22+
1. An **eventArgs** parameter containing the following methods:
23+
24+
* **get_task** returns the current moved task.
25+
26+
* **set_cancel** lets you cancel the event and prevent the task editing.
27+
28+
* **get_cancel** returns **true** if the event has been canceled.
29+
30+
* **get_container** returns the jQuery object representing the wrapping cell element. That element contains the editing UI.
31+
32+
* **get_sender** returns the underlying Kendo UI Gantt widget that fired the event.
33+
34+
````ASP.NET
35+
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientTaskEditing="OnClientTaskEditing">
36+
</telerik:RadGantt>
37+
````
38+
39+
````JavaScript
40+
function OnClientTaskEditing(sender, eventArgs) {
41+
args.set_cancel(true);
42+
}
43+
````
44+
45+
# See Also
46+
47+
* [Client-Side Basics]({%slug gantt/client-side-programming/overview%})
48+
49+
* [Client-Side Events]({%slug gantt/client-side-programming/events/overview%})

controls/gantt/client-side-programming/events/onclienttaskmoveend.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Check our Web Forms article about OnClientTaskMoveEnd.
55
slug: gantt/client-side-programming/events/onclienttaskmoveend
66
tags: onclienttaskmoveend
77
published: True
8-
position: 4
8+
position: 13
99
---
1010

1111
# OnClientTaskMoveEnd

controls/gantt/client-side-programming/events/onclienttaskmovestart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Check our Web Forms article about OnClientTaskMoveStart.
55
slug: gantt/client-side-programming/events/onclienttaskmovestart
66
tags: onclienttaskmovestart
77
published: True
8-
position: 2
8+
position: 11
99
---
1010

1111
# OnClientTaskMoveStart

controls/gantt/client-side-programming/events/onclienttaskmoving.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Check our Web Forms article about OnClientTaskMoving.
55
slug: gantt/client-side-programming/events/onclienttaskmoving
66
tags: onclienttaskmoving
77
published: True
8-
position: 3
8+
position: 12
99
---
1010

1111
# OnClientTaskMoving

controls/gantt/client-side-programming/events/onclienttaskresizeend.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Check our Web Forms article about OnClientTaskResizeEnd.
55
slug: gantt/client-side-programming/events/onclienttaskresizeend
66
tags: onclienttaskresizeend
77
published: True
8-
position: 7
8+
position: 16
99
---
1010

1111
# OnClientTaskResizeEnd

controls/gantt/client-side-programming/events/onclienttaskresizestart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Check our Web Forms article about OnClientTaskResizeStart.
55
slug: gantt/client-side-programming/events/onclienttaskresizestart
66
tags: onclienttaskresizestart
77
published: True
8-
position: 5
8+
position: 14
99
---
1010

1111
# OnClientTaskResizeStart

0 commit comments

Comments
 (0)