Dear Telerik,
I want to use Gantt Chart load From Database, but after I run the data didn't show.
The steps are :
1. Create new project
2. Add Telerik RadScriptManager
3. Add RadGantt and SQL Data source. The table and data I copied from Telerik.mdf.
Here the code :
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
<div>
<div class="demo-container no-bg">
<telerik:RadGantt RenderMode="Lightweight" ID="RadGantt1"
runat="server"
DataSourceID="SqlDataSource1"
DependenciesDataSourceID="SqlDataSource2"
ReadOnly="true"
SelectedView="WeekView">
<DataBindings>
<TasksDataBindings IdField="ID" ParentIdField="ParentID" StartField="Start" OrderIdField="OrderID" SummaryField="Summary" ExpandedField="Expanded" EndField="End" TitleField="Title"
PercentCompleteField="PercentComplete" />
<DependenciesDataBindings TypeField="Type" IdField="ID" PredecessorIdField="PredecessorID" SuccessorIdField="SuccessorID" />
</DataBindings>
</telerik:RadGantt>
</div>
<asp:SqlDataSource runat="server" ID="SqlDataSource1" SelectCommand="SELECT * FROM [GanttTasks]" ConnectionString="<%$ ConnectionStrings:PM %>" ProviderName="<%$ ConnectionStrings:PM.ProviderName %>"/>
<asp:SqlDataSource runat="server" ID="SqlDataSource2" SelectCommand="SELECT * FROM [GanttDependencies]" ConnectionString="<%$ ConnectionStrings:PM %>" ProviderName="<%$ ConnectionStrings:PM.ProviderName %>"/>
</div>
</form>
</body>
</html>
Thanks for any help