New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Database Provider

The purpose of this demo is to show how to use the DataSourceView provider to bind the RadGantt control. In order to use the Datasource provider you need to set the DependenciesDataSourceID and DataSourceID properties to the appropriate datasource control. Also you need to set the properties avaiable under the TaskDataBindings and DependenciesDataBindings sections to match the tasks and dependencies fields of the datasources. Then RadGantt will automatically create a DataSourceView provider and will use it to update the information.
  • DefaultVB.aspx
<%@ Page Language="vb"  %>

<!DOCTYPE html>
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <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" ID="RadGantt1" 
                <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" />

    <asp:SqlDataSource runat="server" ID="SqlDataSource1" SelectCommand="SELECT * FROM [GanttTasks]" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"/>
    <asp:SqlDataSource runat="server" ID="SqlDataSource2" SelectCommand="SELECT * FROM [GanttDependencies]" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"/>


Support & Learning Resources

Find Assistance