<%@ Page Language="vb" AutoEventWireup="true" %>
<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<div class="demo-container no-bg">
<telerik:RadGantt RenderMode="Lightweight" runat="server" ID="RadGantt1" DataSourceID="TasksDataSource" Height="600px" ListWidth="350px"
DependenciesDataSourceID="DependenciesDataSource" SelectedView="WeekView" Skin="Silk" AutoGenerateColumns="false">
<Columns>
<telerik:GanttBoundColumn DataField="Title" DataType="String" Width="120px"></telerik:GanttBoundColumn>
<telerik:GanttBoundColumn DataField="Start" DataType="DateTime" DataFormatString="dd/MM/yy" Width="40px"></telerik:GanttBoundColumn>
<telerik:GanttBoundColumn DataField="End" DataType="DateTime" DataFormatString="dd/MM/yy" Width="40px"></telerik:GanttBoundColumn>
</Columns>
<DataBindings>
<TasksDataBindings
IdField="ID" ParentIdField="ParentID"
StartField="Start" EndField="End"
OrderIdField="OrderID"
SummaryField="Summary"
TitleField="Title" PercentCompleteField="PercentComplete" />
<DependenciesDataBindings
TypeField="Type" IdField="ID"
PredecessorIdField="PredecessorID"
SuccessorIdField="SuccessorID" />
</DataBindings>
</telerik:RadGantt>
</div>
<sds:SessionDataSource ID="TasksDataSource" runat="server" DisplayWarning="false"
PrimaryKeyFields="ID" ProviderName="System.Data.SqlClient"
ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
DeleteCommand="DELETE FROM [GanttTasks] WHERE [ID] = @ID"
InsertCommand="INSERT INTO [GanttTasks] ([ParentID], [OrderID], [Title], [Start], [End], [PercentComplete], [Expanded], [Summary]) VALUES (@ParentID, @OrderID, @Title, @Start, @End, @PercentComplete, @Expanded, @Summary)"
SelectCommand="SELECT * FROM [GanttTasks]"
UpdateCommand="UPDATE [GanttTasks] SET [ParentID] = @ParentID, [OrderID] = @OrderID, [Title] = @Title, [Start] = @Start, [End] = @End, [PercentComplete] = @PercentComplete, [Expanded] = @Expanded, [Summary] = @Summary WHERE [ID] = @ID">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="ParentID" Type="Int32" />
<asp:Parameter Name="OrderID" Type="Int32" />
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Start" Type="DateTime" />
<asp:Parameter Name="End" Type="DateTime" />
<asp:Parameter Name="PercentComplete" Type="Decimal" />
<asp:Parameter Name="Expanded" Type="Boolean" />
<asp:Parameter Name="Summary" Type="Boolean" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="ParentID" Type="Int32" />
<asp:Parameter Name="OrderID" Type="Int32" />
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Start" Type="DateTime" />
<asp:Parameter Name="End" Type="DateTime" />
<asp:Parameter Name="PercentComplete" Type="Decimal" />
<asp:Parameter Name="Expanded" Type="Boolean" />
<asp:Parameter Name="Summary" Type="Boolean" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
</sds:SessionDataSource>
<sds:SessionDataSource ID="DependenciesDataSource" runat="server" DisplayWarning="false"
PrimaryKeyFields="ID" ProviderName="System.Data.SqlClient"
ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
DeleteCommand="DELETE FROM [GanttDependencies] WHERE [ID] = @ID"
InsertCommand="INSERT INTO [GanttDependencies] ([PredecessorID], [SuccessorID], [Type]) VALUES (@PredecessorID, @SuccessorID, @Type)"
SelectCommand="SELECT * FROM [GanttDependencies]"
UpdateCommand="UPDATE [GanttDependencies] SET [PredecessorID] = @PredecessorID, [SuccessorID] = @SuccessorID, [Type] = @Type WHERE [ID] = @ID">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="PredecessorID" Type="Int32" />
<asp:Parameter Name="SuccessorID" Type="Int32" />
<asp:Parameter Name="Type" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="PredecessorID" Type="Int32" />
<asp:Parameter Name="SuccessorID" Type="Int32" />
<asp:Parameter Name="Type" Type="Int32" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
</sds:SessionDataSource>
</form>
</body>
</html>