Parent Child Hierarchy

2 posts, 0 answers
  1. Mohammad
    Mohammad  avatar
    12 posts
    Member since:
    Dec 2014

    Posted 30 Dec 2014 Link to this post

    I have following RadGantt chart it is not showing parent child hierarchy properly. it is creating hierarchy but displaying same as parent.

    telerik:RadGantt runat="server" ID="RadGantt1"
                                OnTaskInsert="RadGantt1_TaskInsert" SelectedView="WeekView" AutoGenerateColumns="false"
                                <YearView UserSelectable="true" />
                                    <telerik:GanttBoundColumn DataField="Title"></telerik:GanttBoundColumn>
                                    <telerik:GanttBoundColumn DataField="Start"></telerik:GanttBoundColumn>
                                    <telerik:GanttBoundColumn DataField="End"></telerik:GanttBoundColumn>
                                    <telerik:GanttBoundColumn DataField="Duration" DataType="DateTime" HeaderText="Duration" DataFormatString="{0:HH\:MM\:SS}"></telerik:GanttBoundColumn>
                                    <TasksDataBindings IdField="ID" TitleField="Title" StartField="Start" EndField="End"
                                        PercentCompleteField="PercentComplete" OrderIdField="OrderID" SummaryField="Summary" ParentIdField="ParentID" />
                                    <DependenciesDataBindings IdField="ID" PredecessorIdField="PredecessorID"
                                        SuccessorIdField="SuccessorID" TypeField="Type" />

    while (reader.Read())
                            Task t = new Task();
                            t.ID = reader.GetValue(0);
                            t.Title = reader.GetString(1);
                            t.Start = reader.GetDateTime(2);
                            t.End = reader.GetDateTime(3);
                            t.PercentComplete = decimal.Parse(reader.GetValue(4).ToString());
                            t.ParentID = reader.GetValue(5);
    RadGantt1.DataSource = Tasks;
               RadGantt1.DependenciesDataSource = Dependencies;

  2. Nencho
    Nencho avatar
    1822 posts

    Posted 02 Jan 2015 Link to this post

    Hello Mohammad,

    I have performed some local tests, using the demonstrated implementation that you have set at your and the parent/child hierarchy is correctly achieved at my end. Please make sure that the ParentID fields are correctly set in your datasource, so that the RadGantt control could read them properly and visualized the hierarchy.

    If you still experience any issues, please submit a support ticket and provide us with a simplified runnable sample, along with the datasource that you use, so we could inspect it locally and troubleshoot the problem for you.

Back to Top