This is a migrated thread and some comments may be shown as answers.

GanttView with access database

1 Answer 128 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Jorge
Top achievements
Rank 1
Jorge asked on 21 Jun 2015, 04:30 AM

Hi there,

How can i link the GanttView control with access data table? I mean how can i build the sql sentence and link to the gantt control?

This is my code below:

        Dim strSQLCa As String
        Dim dsTask As New DataSet

        strSQLCa = "SELECT ID, PARENTID, TITLE, TSTART, TEND, TPROGRESS FROM TASK ORDER BY PROJID, PARENTID, ID"

        Dim adpTC As New OleDb.OleDbDataAdapter(strSQLCa, connPRO)
        dsTask.Tables.Add("TableTask")
        adpTC.Fill(dsTask.Tables("TableTask"))

        Dim data As New DataSet()
        data.Tables.Add("Task")

        Me.RadGanttView1.GanttViewElement.TaskDataMember = "Tasks"
        Me.RadGanttView1.GanttViewElement.ChildMember = "Id"
        Me.RadGanttView1.GanttViewElement.ParentMember = "ParentId"
        Me.RadGanttView1.GanttViewElement.TitleMember = "Title"
        Me.RadGanttView1.GanttViewElement.StartMember = "Start"
        Me.RadGanttView1.GanttViewElement.EndMember = "End"
        Me.RadGanttView1.GanttViewElement.ProgressMember = "Progress"
        Me.RadGanttView1.GanttViewElement.LinkDataMember = "Links"
        Me.RadGanttView1.GanttViewElement.LinkStartMember = "StartId"
        Me.RadGanttView1.GanttViewElement.LinkEndMember = "EndId"
        Me.RadGanttView1.GanttViewElement.LinkTypeMember = "LinkType"

        Me.RadGanttView1.GanttViewElement.DataSource = dsTask.Tables("TableTask")

        Me.RadGanttView1.Columns.Add("Start")
        Me.RadGanttView1.Columns.Add("End")

 

And I'm getting the following error:

 "Child list for field Tasks cannot be created."

Please can you guys help me with this?

 

Thank you in advance.

Jorge

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 23 Jun 2015, 02:39 PM
Hello Jorge,

Thank you for writing.

Usually this exception is thrown because the value set to the data member property, does not match the name of the table coming from your data set. Please check the following forum thread as this matter is also discussed there: https://social.msdn.microsoft.com/Forums/en-US/a4d70332-b6d8-4c72-abec-ce5e154fd578/child-list-for-field-customer-cannot-be-created?forum=adodotnetdataset.

Generally speaking you can bind RadGanttView in several ways. Please check the articles in this section of our documentation: Working with Data. I created a project how you can bind to an access database using only the designer and alternatively, once you have your data set returned set up all the relations and assign the data source at run time.

I hope this information was useful. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GanttView
Asked by
Jorge
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or