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

XML Provider Binding

This help article describes how use Gantt Resources with the built-in Xml Provider.

There is not much difference in using XML Provider with Resources compared to using Xml Provider without resources. Just set the EnableResources property of the Gantt to true and extend the XML file to support resources.

Gantt expects that the Resources are defined. It does not provide mechanism to manipulate them.

The example provided below illustrates a possible implementation of RadGantt with Resources, bound to XML Provider.

<telerik:RadGantt RenderMode="Lightweight" ID="RadGantt1" runat="server" AutoGenerateColumns="false" SelectedView="WeekView" EnableResources="true">
        <telerik:GanttBoundColumn DataField="Title" DataType="String"></telerik:GanttBoundColumn>
        <telerik:GanttResourceColumn HeaderText="Asssigned Resources"></telerik:GanttResourceColumn>
protected void Page_Load(object sender, EventArgs e)
    RadGantt1.Provider = new XmlGanttProvider(Server.MapPath("~/App_Data/Gantt.xml"));
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    RadGantt1.Provider = New XmlGanttProvider(Server.MapPath("~/App_Data/Gantt.xml"))
End Sub

The format of the XML file that contains the data should look similar to the shown below.

<?xml version="1.0" encoding="utf-8"?>
  <Tasks />
  <Dependencies />
  <Assignments />
      <Text>Thomas Hardy</Text>
      <Text>Elizabeth Lincoln</Text>

See Also

In this article