Add functionality to sort tasks alphabetically, by date, by progress.
Add functionality to filter items in RadGanttView.
Columns can automatically fill the entire width of the GanttViewTextViewElement . Just set the AutoSizeColumnsMode property to Fill.
Workaround: create custom GanttViewTimelineItemElement with special layout arranging the elements in depending on their parent`s final size. The attached project features a possible implementation.
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.
The position of splitter should allow to be fixed while resizing the control. Users want to be able to set the splitter next to the last column of TextViewElement when resizing.
Currently when you set the TimelineRange property to TimeRange.Week displays two elements (the TopElement with weeks and the BottomElement with days). There are cases where users want to display single timeline - only weeks, days, quarters or years independent of the second timeline.
To reproduce: public Form1() { InitializeComponent(); DataTable tasks = new DataTable("Tasks"); tasks.Columns.Add("Id", typeof(int)); tasks.Columns.Add("ParentId", typeof(int)); tasks.Columns.Add("Title", typeof(string)); tasks.Columns.Add("Start", typeof(DateTime)); tasks.Columns.Add("End", typeof(DateTime)); tasks.Columns.Add("Progress", typeof(decimal)); DataTable links = new DataTable("Links"); links.Columns.Add("StartId", typeof(int)); links.Columns.Add("EndId", typeof(int)); links.Columns.Add("LinkType", typeof(int)); DataSet data = new DataSet(); data.Tables.Add(tasks); data.Tables.Add(links); Random rand = new Random(); int cnt = 3000; int cnt2 = 6000; for (int i = 1; i < cnt; i++) { tasks.Rows.Add(i, 0, "Summary task title", DateTime.Now.AddDays(i), DateTime.Now.AddDays(i + 5), 30m); } for (int i = cnt; i < cnt2; i++) { tasks.Rows.Add(i, rand.Next(1, cnt), "First child task title", new DateTime(2010, 10, 10), new DateTime(2010, 10, 12), 10); } for (int i = 0; i < 2000; i++) { links.Rows.Add(rand.Next(cnt, cnt2), rand.Next(1, cnt), 1); } this.radGanttView1.GanttViewElement.TaskDataMember = "Tasks"; this.radGanttView1.GanttViewElement.ChildMember = "Id"; this.radGanttView1.GanttViewElement.ParentMember = "ParentId"; this.radGanttView1.GanttViewElement.TitleMember = "Title"; this.radGanttView1.GanttViewElement.StartMember = "Start"; this.radGanttView1.GanttViewElement.EndMember = "End"; this.radGanttView1.GanttViewElement.ProgressMember = "Progress"; this.radGanttView1.GanttViewElement.LinkDataMember = "Links"; this.radGanttView1.GanttViewElement.LinkStartMember = "StartId"; this.radGanttView1.GanttViewElement.LinkEndMember = "EndId"; this.radGanttView1.GanttViewElement.LinkTypeMember = "LinkType"; this.radGanttView1.GanttViewElement.DataSource = data; this.radGanttView1.Columns.Add("Start"); this.radGanttView1.Columns.Add("End"); } private void radButton1_Click(object sender, EventArgs e) { this.radGanttView1.PrintPreview(); }
To reproduce: click (mouse down) on a task but then release the mouse button off the task. It then stays selected even when I click on other tasks. You can repeat this over and over and end up with every task as "selected" as shown in the video. Workaround: AddHandler Me.RadGanttView1.GraphicalViewItemFormatting, AddressOf GraphicalViewItemFormatting Private Sub GraphicalViewItemFormatting(sender As Object, e As GanttViewGraphicalViewItemFormattingEventArgs) Dim taskItem As GanttViewTaskItemElement = TryCast(e.ItemElement, GanttViewTaskItemElement) If taskItem IsNot Nothing AndAlso taskItem.TaskElement.VisualState.Contains(".MouseDown") AndAlso Not taskItem.Selected Then taskItem.TaskElement.IsMouseDown = False End If End Sub
How to reproduce: this.radGanttView1.GanttViewElement.GraphicalViewElement.TimelineRange = Telerik.WinControls.UI.TimeRange.DayQuarterHours; this.radGanttView1.GanttViewElement.GraphicalViewElement.AutomaticTimelineTimeRange = true; this.radGanttView1.GanttViewElement.GraphicalViewElement.OnePixelTime = new TimeSpan(0, 0, 15); Workaround: at the moment the Gantt control does not support an automatic timeline range for day quarter hours. The TimeRange.DayQuarterHours is similar to the half days and they should be handled the same way when in automatic timeline. If possible TimeRange.DayHalfHours this.radGanttView1.GanttViewElement.GraphicalViewElement.TimelineRange = Telerik.WinControls.UI.TimeRange.DayHalfHours;
Add a support for image column in RadGanttView
Add new timeline view which shows Time/Hours
Add possibility to specify the start and end hours when you display hours in the applied time scale.
This event should be fired when a task is modified either by the graphical view or by the columns on the left side. In the arguments you should have access to the changed property.
Please look at the attached screenshot. Workaround: you can replace the StackLayoutElement used in the GanttViewTimelineItemBottomStackElement with a DockLayoutPanel for example as follows: Public Class CustomGanttViewTimelineItemElement Inherits GanttViewTimelineItemElement Public Sub New(data As GanttViewTimelineDataItem, graphicalViewElement As GanttViewGraphicalViewElement) MyBase.New(data, graphicalViewElement) End Sub Dim dock As DockLayoutPanel Protected Overrides Sub CreateChildElements() MyBase.CreateChildElements() dock = New DockLayoutPanel() dock.StretchHorizontally = True dock.LastChildFill = False Me.Children.RemoveAt(Me.Children.Count - 1) Me.Children.Add(dock) End Sub Protected Overrides Sub CalculateItems() Me.SuspendLayout() Dim cellInfo As GanttTimelineCellsInfo = Me.GraphicalViewElement.TimelineBehavior.GetTimelineCellInfoForItem(Me.Data, Me.GraphicalViewElement.TimelineRange) While Me.dock.Children.Count > cellInfo.NumberOfcells Me.dock.Children.RemoveAt(0) End While While Me.dock.Children.Count < cellInfo.NumberOfcells Dim element As LightVisualElement = Me.GraphicalViewElement.TimelineBehavior.CreateElement() Me.dock.Children.Add(element) End While Me.TopElement.Text = Me.GraphicalViewElement.TimelineBehavior.GetTimelineTopElementText(Me.Data) For i As Integer = 0 To Me.dock.Children.Count - 1 DirectCast(Me.dock.Children(i), LightVisualElement).Text = Me.GraphicalViewElement.TimelineBehavior.GetTimelineBottomElementText(Me.Data, i + cellInfo.StartIndex) Next Me.ResumeLayout(True) End Sub Protected Overrides Function MeasureOverride(availableSize As SizeF) As SizeF Dim clientRect As RectangleF = Me.GetClientRectangle(availableSize) Dim width As Single = Me.Data.Width - Me.GraphicalViewElement.TimelineContainer.ItemSpacing + availableSize.Width - clientRect.Width Me.TopElement.Measure(New SizeF(width, clientRect.Height / 2.0F)) Me.dock.Measure(New SizeF(width, clientRect.Height / 2.0F)) Return New SizeF(width, Me.TopElement.DesiredSize.Height + Me.dock.DesiredSize.Height) End Function Protected Overrides Function ArrangeOverride(finalSize As SizeF) As SizeF Dim clientRect As RectangleF = Me.GetClientRectangle(finalSize) Dim topRect As New RectangleF(clientRect.X, clientRect.Y, Me.DesiredSize.Width, clientRect.Height / 2.0F) Me.TopElement.Arrange(topRect) Dim bottomRect As New RectangleF(clientRect.X, topRect.Bottom, Me.DesiredSize.Width, clientRect.Height - topRect.Height) Me.dock.Arrange(bottomRect) Return clientRect.Size End Function End Class Public Class CustomGanttViewTimelineElementProvider Inherits GanttViewTimelineElementProvider Public Sub New(owner As GanttViewGraphicalViewElement) MyBase.New(owner) End Sub Public Overrides Function CreateElement(data As GanttViewTimelineDataItem, context As Object) As IVirtualizedElement(Of GanttViewTimelineDataItem) Dim element As GanttViewTimelineItemElement = Me.OnItemElementCreating(data) Return New CustomGanttViewTimelineItemElement(data, Owner) End Function End Class