Office2007 skin

Gantt - Database Provider

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB
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 PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<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

Help Us Improve

Was this example helpful?