Completed
Last Updated: 03 Sep 2019 07:00 by ADMIN
Release R3 2019

Please use the following code snippet to setup the Gantt view:

Sub New()

                 


        InitializeComponent()

        Dim dt As New DataTable
        dt.Columns.Add("ID", GetType(Integer))
        dt.Columns.Add("Group_ID", GetType(Integer))
        dt.Columns.Add("Title", GetType(String))
        dt.Columns.Add("Start", GetType(DateTime))
        dt.Columns.Add("End", GetType(DateTime))

        dt.Rows.Add(-999, 0, "Root", New DateTime(2019, 8, 21), New DateTime(2019, 8, 30))
        dt.Rows.Add(6, -999, "Item 1", New DateTime(2019, 8, 21), New DateTime(2019, 8, 23))
        dt.Rows.Add(7, -999, "Item 2", New DateTime(2019, 8, 26), New DateTime(2019, 8, 30))
        dt.Rows.Add(1000, 6, "Sub1.1", New DateTime(2019, 8, 21), New DateTime(2019, 8, 22))
        dt.Rows.Add(1001, 6, "Sub1.2", New DateTime(2019, 8, 22), New DateTime(2019, 8, 23))
        dt.Rows.Add(1002, 6, "Sub1.3", New DateTime(2019, 8, 23), New DateTime(2019, 8, 23))
        dt.Rows.Add(1003, 7, "Sub2.1", New DateTime(2019, 8, 26), New DateTime(2019, 8, 29))



        Me.RadGanttView1.DataSource = dt
        Me.RadGanttView1.ChildMember = "ID"
        Me.RadGanttView1.ParentMember = "Group_ID"
        Me.RadGanttView1.TitleMember = "Title"
        Me.RadGanttView1.StartMember = "Start"
        Me.RadGanttView1.EndMember = "End"

        Me.RadGanttView1.Columns.Add("ID")
        Me.RadGanttView1.Columns.Add("Title")
        Me.RadGanttView1.GanttViewElement.GraphicalViewElement.TimelineStart = New DateTime(2019, 8, 20)
    End Sub 

However, if you switch the order of adding the rows, not all items will be visible in RadGanttView:

dt.Rows.Add(1000, 6, "Sub1.1", New DateTime(2019, 8, 21), New DateTime(2019, 8, 22))
        dt.Rows.Add(1001, 6, "Sub1.2", New DateTime(2019, 8, 22), New DateTime(2019, 8, 23))
        dt.Rows.Add(1002, 6, "Sub1.3", New DateTime(2019, 8, 23), New DateTime(2019, 8, 23))
        dt.Rows.Add(1003, 7, "Sub2.1", New DateTime(2019, 8, 26), New DateTime(2019, 8, 29))

        dt.Rows.Add(-999, 0, "Root", New DateTime(2019, 8, 21), New DateTime(2019, 8, 30))
        dt.Rows.Add(6, -999, "Item 1", New DateTime(2019, 8, 21), New DateTime(2019, 8, 23))
        dt.Rows.Add(7, -999, "Item 2", New DateTime(2019, 8, 26), New DateTime(2019, 8, 30))

Completed
Last Updated: 20 Aug 2019 11:34 by ADMIN
Release R3 2019

Please refer to the attached sample project and run it. Select a random item and press the button. You will obtain the error. If no selection is available, the item is removed as expected. 

Workaround: use Begin/EndUpdate block while deleting a record from the DataTable:

        Me.RadGanttView1.BeginUpdate()
        _dataset.Tables("Tasks").Rows.RemoveAt(2)
        Me.RadGanttView1.EndUpdate()

Completed
Last Updated: 15 Aug 2019 13:54 by ADMIN
Release R3 2019 (LIB 2019.2.819)

Please run the attached sample project. Select one of the child tasks and click the button. The new task is expected to be inserted at the selected item's position. However, it is appended at the bottom as it is demonstrated in the gif file.

Workaround: rebind RadGanttView after inserting a new row to the DataTable: 

    Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        Try
            If Me.RadGanttView1.SelectedItem IsNot Nothing Then
                Dim i_rowIndex As Int32 = _dataset.Tables("Tasks").Rows.IndexOf(Me.RadGanttView1.SelectedItem.DataBoundItem.Row)
                Dim i_datarow As DataRow = _dataset.Tables("Tasks").NewRow
                Dim i_startDate As Date = New Date(Today.Year, Today.Month, Today.Day, 8, 0, 0)
                i_datarow("ID") = 3001
                i_datarow("ParentID") = _projektID
                i_datarow("Bezeichnung") = "inserted Aufgabe"
                i_datarow("Start") = i_startDate.AddHours(6 * 5)
                i_datarow("Ende") = i_startDate.AddHours(6 + 100)
                _dataset.Tables("Tasks").Rows.InsertAt(i_datarow, i_rowIndex)
                Me.RadGanttView1.DataSource = Nothing
                With Me.RadGanttView1.GanttViewElement
                    .TaskDataMember = "Tasks"
                    .ChildMember = "ID"
                    .ParentMember = "ParentID"
                    .TitleMember = "Bezeichnung"
                    .StartMember = "Start"
                    .EndMember = "Ende"
                End With
                Me.RadGanttView1.DataSource = _dataset
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

 

Approved
Last Updated: 04 Jul 2019 06:16 by ADMIN
Created by: Frank
Comments: 0
Category: GanttView
Type: Feature Request
1
Add support for task interruptions
Completed
Last Updated: 01 Jul 2019 14:52 by ADMIN
Release R3 2019 (LIB 2019.2.708)
Hello, 
I would like set timeline start at the same date like scheduler. 
But sometimes it don't refresh (see attachment).
What can I do?
kind regards
Frank
Completed
Last Updated: 01 Jul 2019 14:38 by ADMIN
Release R3 2019 (LIB 2019.2.708)

The latest release of WinForms causes a fatal exception when adding an item to a BindingList that is used in a RadGridView and a RadGanttView.

The first time an item is added there is not issue.

The second time an item is added, the following exception occurs.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.WinControls.UI.GanttViewBindingProvider.GanttTaskList.IndexOf(Object key)
   at Telerik.WinControls.UI.GanttViewBindingProvider.GanttTaskList.get_Item(Object key)
   at Telerik.WinControls.UI.GanttViewBindingProvider.AddTaskByCM(CurrencyManager cm, Int32 index)
   at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)
   at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)
   at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)
   at System.ComponentModel.BindingList`1.OnListChanged(ListChangedEventArgs e)
   at System.ComponentModel.BindingList`1.FireListChanged(ListChangedType type, Int32 index)
   at MissileWarningThreatPlanner.EventWindow.EventList.GenMissileEventWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) in C:\Shape Source\VS\MissileWarningThreatPlanner - VS2010\MissileWarningThreatPlanner\EventWindow\EventList.cs:line 5329
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)

This is code that has not been modified for quite some time.  There has been no issue until the latest release.

I do not have time to try to create a simple example to try to reproduce the error at this time.  I will if possible.

For now, we are forced to revert to a previous version.

 

Ken...

Completed
Last Updated: 17 Jun 2019 14:10 by ADMIN
Release R2 2019 SP1
Created by: Karsten
Comments: 3
Category: GanttView
Type: Bug Report
1

Hi,

why is the datatype of the ChildMember/ParentMember item limited to Int32? This is a problem when displaying tasks or events from tables with string or UUID idents. It would be a more flexible control if the type could be any type. Should not be a big deal to change this or is it?

Thank you und kind regards

Karsten

Approved
Last Updated: 16 May 2019 05:08 by ADMIN
It would be useful if the control takes advantage of the RadSpreadProcessing, RadPdfProcessing and RadWordsProcessing. This will allow developers to easily export the control's contents to the desired format. 
Approved
Last Updated: 20 Mar 2019 08:49 by ADMIN
Created by: Valeriane
Comments: 1
Category: GanttView
Type: Feature Request
1

Hey !

I need to know if you plan the development of a new function :

When you are in the list of your tasks, i want to navigate with the keyboard. 

Im' Here :

 

And when i navigate in the list with the keyboard, i need to see the last column on the same task :

The focus is good but the horizontal scrollBar is on the same place and we can't the the all value of the cell.

Can we plan the improvment ? Or do you have a clean solution?

 

If you need more informations,

don't hesitate to contact me

Regards,

Valériane 

 

Completed
Last Updated: 06 Feb 2019 12:38 by ADMIN
Created by: Valeriane
Comments: 4
Category: GanttView
Type: Bug Report
1

Hey,

 

We have a problem with the GanttViewTimeLineContainer as you see in the screeshot  : gantt_print2.png

When we are in TimeLineRange = TimeRange.Year and we print the gantt, we have a problem with the appearence of GanttViewTimeLineContainer, we can see the first line with the year (it's ok) but after, the second line we can see a reperition of all month : jfmamjjasond jfmamjjasond jfmamjjasond jfmamjjasond etc etc etc

Can we change the appearence ? Do you have an explanation for this visualization ? 

 

Thank you,

Regards,

Valériane E.

Completed
Last Updated: 23 Nov 2018 14:51 by Dimitar
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: GanttView
Type: Feature Request
1
When you edit a link, e.g. change its end item, there is no appropriate event to handle this situation. The Links.CollectionChanged event is not fired. It would be nice to have a LinkChanged event which will be fired when a link is modified similar to the ItemChanged event for the tasks.

Workaround:
            foreach (GanttViewLinkDataItem link in this.radGanttView1.Links)
            {
                link.PropertyChanged += link_PropertyChanged;
            }

        private void link_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "EndItem")
            {
            }
            
        }
Completed
Last Updated: 05 Nov 2018 14:44 by Dimitar
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: GanttView
Type: Bug Report
1
To reproduce: please run the sample project and follow the steps illustrated in the attached gif file. This shows how I’m attempting to add children to a root task. Upon adding a child task I am unable to scroll down to see the rest of the pre-existent root tasks until I first collapse and expand any visible root or child task.

Workaround:

        public RadForm2()
        {
            InitializeComponent();

            this.radGanttView1.ItemAdded += radGanttView1_ItemAdded;  
        }
       
        private void radGanttView1_ItemAdded(object sender, Telerik.WinControls.UI.GanttViewItemAddedEventArgs e)
        {
            item = e.Item;
        }

        GanttViewDataItem item;
        
        private void radButton1_Click(object sender, EventArgs e)
        {
            this.radGanttView1.GanttViewElement.InvalidateMeasure(true);
            this.radGanttView1.GanttViewElement.UpdateLayout();

            this.radGanttView1.GanttViewElement.GraphicalViewElement.Scroller.ScrollToItem(item);
        }
Completed
Last Updated: 13 Aug 2018 08:13 by Dimitar
To reproduce: run the sample project and try to move a task.

Workaround:

 Timer timer = new Timer();

        private void DragDropService_Stopped(object sender, EventArgs e)
        {
            timer = new Timer();
            timer.Interval = 300;
            timer.Tick += timer_Tick;
            
        }

        private void timer_Tick(object sender, EventArgs e)
        {
            timer.Stop();
            data.Tables["Tasks"].Clear();
        }

Workaround 2:

        private void radGanttView1_ItemElementCreating(object sender, Telerik.WinControls.UI.GanttViewItemElementCreatingEventArgs e)
        {
            if (e.Item.Items.Count == 0 && e.ViewElement is GanttViewGraphicalViewElement)
            {
                e.ItemElement = new MyGanttViewTaskItemElement(e.ViewElement as GanttViewGraphicalViewElement); 
            }
        }

        public class MyGanttViewTaskItemElement : GanttViewTaskItemElement
        {
            public MyGanttViewTaskItemElement(GanttViewGraphicalViewElement ganttViewBaseViewElement) : base(ganttViewBaseViewElement)
            {
            }
            
            protected override Type ThemeEffectiveType
            {
                get
                {
                    return typeof(GanttViewTaskItemElement);
                }
            }

            public override void Detach()
            {
                var obj = this.Data;
                this.Data.SuspendPropertyNotifications();
                base.Detach();
                obj.ResumePropertyNotifications(); 
            }

            public override void Synchronize()
            {
                DataSet ds = this.Data.GanttViewElement.DataSource as DataSet;
                if (ds != null && this.Data != null)
                {
                    DataRowView rowView = this.Data.DataBoundItem as DataRowView;
                    if (rowView != null && !RowExists(rowView.Row))//!ds.Tables[0].Rows.Contains(rowView.Row))
                    {
                        return;
                    }
                }
                base.Synchronize();
            }

            private bool RowExists(DataRow dataRow)
            {
                DataSet ds = this.Data.GanttViewElement.DataSource as DataSet;
                bool res = false;
                foreach (DataRow r in ds.Tables[0].Rows)
                {
                    if (r.Equals(dataRow))
                    {
                        return true;
                    }
                }
                return res;
            }
        }
Approved
Last Updated: 04 Jul 2018 11:44 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: GanttView
Type: Bug Report
1
To reproduce: run the sample project and scroll to the end of the view. You will notice that the tasks are not properly aligned. You can increase the GraphicalViewElement.OnePixelTime in order to make the alignment even worse.

Workaround: Adjust the GraphicalViewElement.OnePixelTime in order to obtain the correct alignment.
Completed
Last Updated: 25 Jun 2018 13:06 by Viktor
To reproduce:
1) Open the Demo application >> Settings example.
2) Select a task and activate the editor for it.
3) Delete the task by clicking the button above.

It may be necessary to repeat the steps several times. The error is not reproduced immediately. 
Approved
Last Updated: 21 Jun 2018 14:06 by ADMIN
Approved
Last Updated: 21 Jun 2018 14:00 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 2
Category: GanttView
Type: Feature Request
5
Columns can automatically fill the entire width of the GanttViewTextViewElement . Just set the AutoSizeColumnsMode property  to Fill.
Completed
Last Updated: 15 Jun 2018 13:22 by Dimitar
To reproduce:
- Set the range to lest than one day.
- Set the TimelineRange to DayHalfHours

Workaround: 
Make sure that the range is at least one day. 
Completed
Last Updated: 30 Apr 2018 11:16 by Dimitar
Even though you can't  modify the tasks you can see the link handles which are usually used for linking different tasks. They shouldn't be displayed when the RadGanttView is in read-only mode.

Workaround: handle the GraphicalViewItemFormatting event and manually hide the link handles: 

        private void radGanttView1_GraphicalViewItemFormatting(object sender, GanttViewGraphicalViewItemFormattingEventArgs e)
        {
            GanttGraphicalViewBaseItemElement itemElement = e.ItemElement as GanttGraphicalViewBaseItemElement;
            if (itemElement != null)
            {
                Console.WriteLine(itemElement.LeftLinkHandleElement.Visibility);
                itemElement.LeftLinkHandleElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                itemElement.LeftLinkHandleElement.PropertyChanged -= LeftLinkHandleElement_PropertyChanged;
                itemElement.LeftLinkHandleElement.PropertyChanged += LeftLinkHandleElement_PropertyChanged;
                itemElement.RightLinkHandleElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                itemElement.RightLinkHandleElement.PropertyChanged -= LeftLinkHandleElement_PropertyChanged;
                itemElement.RightLinkHandleElement.PropertyChanged += LeftLinkHandleElement_PropertyChanged;
            }
        }

        private void LeftLinkHandleElement_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            GanttViewTaskLinkHandleElement linkHanle = sender as GanttViewTaskLinkHandleElement;
            if (e.PropertyName == "Visibility" && linkHanle.Visibility == Telerik.WinControls.ElementVisibility.Visible)
            {
                linkHanle.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
            }
        }
Completed
Last Updated: 30 Apr 2018 06:58 by Dimitar
The spin editor has a default minimum and maximum (0,100)

Workaround:
private void GanttViewElement_EditorInitialized(object sender, GanttViewItemEditorInitializedEventArgs e)
{
    var editor = e.Editor as BaseSpinEditor;
    if (editor != null)
    {
        editor.MaxValue = int.MaxValue;
        var value = e.Item[radGanttView1.CurrentColumn];
        editor.Value = value;
    }
}
1 2 3 4 5