To reproduce: please refer to the attached sample project. Try to edit the title for one of the child tasks in the grid and click the Workaround: private void radGanttView1_ItemChanged(object sender, Telerik.WinControls.UI.GanttViewItemChangedEventArgs e) { IEditableObject editebleObejct = e.Item.DataBoundItem as IEditableObject; if (editebleObejct != null) { editebleObejct.EndEdit(); } }
How to reproduce: 1. Run the project 2. Press the radButton1 3. Edit description of the first line (Line whose Identifier is TestProject1) 4. Clicking some other line to end the edit causes the ASSERT to come up
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.
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.
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; } }
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.
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") { } }
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.
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
If one applies a TypeConverter with standard values to a property, this type converter is not used to convert these standard values to and from string when they are displayed in a drop down list editor.
To reproduce: Open QSF, go to GanttView, open the Settings example, go to the very last task and change the view mode to month. You will notice that the positions of the tasks are not being updated
To reproduce: Add Tasks which appear far after the start of the timeline. You will notice that some of them are not displayed at the right position.
Add functionality to perform grouping over the columns in the GanttViewTextViewElement . As a result the GraphicalViewElement should be refreshed accordingly.
To reproduce: add a RadGanttView and populate it with data. Use the GraphicalViewItemFormatting event in order to change the e.ItemElement.TaskElement.Text. However, the changes are not applied. Workaround: private void radGanttView1_GraphicalViewItemFormatting(object sender, GanttViewGraphicalViewItemFormattingEventArgs e) { e.ItemElement.Tag = "Custom text"; } public class CustomRadGanttView : RadGanttView { protected override RadGanttViewElement CreateGanttViewElement() { return new CustomRadGanttViewElement(); } public override string ThemeClassName { get { return typeof(RadGanttView).FullName; } } } public class CustomRadGanttViewElement : RadGanttViewElement { public CustomRadGanttViewElement() { } protected override Type ThemeEffectiveType { get { return typeof(RadGanttViewElement); } } protected override GanttViewGraphicalViewElement CreateGraphicalViewElement(RadGanttViewElement ganttView) { return new CustomGanttViewGraphicalViewElement(ganttView); } } public class CustomGanttViewGraphicalViewElement : GanttViewGraphicalViewElement { public CustomGanttViewGraphicalViewElement(RadGanttViewElement ganttView) : base(ganttView) { } protected override Type ThemeEffectiveType { get { return typeof(GanttViewGraphicalViewElement); } } protected override IVirtualizedElementProvider<GanttViewDataItem> CreateElementProvider() { return new CustomGanttViewVirtualizedElementProvider(this); } } public class CustomGanttViewVirtualizedElementProvider : GanttViewVirtualizedElementProvider { public CustomGanttViewVirtualizedElementProvider(GanttViewBaseViewElement owner) : base(owner) { } public override IVirtualizedElement<GanttViewDataItem> CreateElement(GanttViewDataItem data, object context) { IVirtualizedElement<GanttViewDataItem> taskElement = base.CreateElement(data, context) ; if (taskElement is GanttViewTaskItemElement) { FieldInfo fi = typeof(GanttViewVirtualizedElementProvider).GetField("owner", BindingFlags.NonPublic | BindingFlags.Instance); GanttViewBaseViewElement owner = fi.GetValue(this) as GanttViewBaseViewElement ; return new CustomGanttViewTaskItemElement(owner as GanttViewGraphicalViewElement); } return taskElement; } } public class CustomGanttViewTaskItemElement:GanttViewTaskItemElement { public CustomGanttViewTaskItemElement(GanttViewGraphicalViewElement owner) : base(owner) { } public override void Synchronize() { base.Synchronize(); if (this.Tag != null) { this.TaskElement.Text = this.Tag.ToString(); } } }
To reproduce: public RadForm1() { 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)); tasks.Rows.Add(1, 0, "Summary task title", new DateTime(2010, 10, 8), new DateTime(2010, 10, 18), 30m); tasks.Rows.Add(2, 1, "First child task title", new DateTime(2010, 10, 10), new DateTime(2010, 10, 12), 10); tasks.Rows.Add(3, 1, "Second child task title", new DateTime(2010, 10, 12), new DateTime(2010, 10, 15), 20m); tasks.Rows.Add(4, 1, "Milestone", new DateTime(2010, 10, 15), new DateTime(2010, 10, 15), 0m); links.Rows.Add(2, 3, 1); links.Rows.Add(3, 4, 1); DataSet data = new DataSet(); data.Tables.Add(tasks.Copy()); data.Tables.Add(links); this.radGridView1.DataSource = tasks; radGridView1.BestFitColumns(); this.radGanttView1.CreateDataItem += radGanttView1_CreateDataItem; this.radGanttView1.AllowSummaryEditing = true; 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"); this.radGanttView1.Columns.Add("Progress"); this.radGanttView1.GanttViewElement.GraphicalViewElement.TimelineStart = new DateTime(2010, 10, 7); this.radGanttView1.GanttViewElement.GraphicalViewElement.TimelineEnd = new DateTime(2010, 12, 10); } You will notice that the start and end of the summary task are changed in the gantt view. Workaround: void radGanttView1_CreateDataItem(object sender, CreateGanttDataItemEventArgs e) { e.Item = new MyGanttViewDataItem(); } public class MyGanttViewDataItem : GanttViewDataItem { protected override void OnChildAdded(GanttViewDataItem child) { if (this.Parent != null && !this.GanttViewElement.AllowSummaryEditing) { base.OnChildAdded(child); } } protected override void OnChildRemoved(GanttViewDataItem child) { if (this.Parent != null && !this.GanttViewElement.AllowSummaryEditing) { base.OnChildRemoved(child); } } }
Workaround: Sub New() InitializeComponent() Me.SetUpGantt() Me.RadGanttView1.GanttViewElement.TextViewElement.Scroller.AllowHiddenScrolling = True AddHandler Me.RadGanttView1.MouseUp, AddressOf Me.RadGanttView1_MouseUp End Sub Private Sub RadGanttView1_MouseUp(sender As Object, e As MouseEventArgs) Dim location = e.Location Dim splitter As GanttViewViewsSplitterElement = TryCast(Me.RadGanttView1.ElementTree.GetElementAtPoint(e.Location), GanttViewViewsSplitterElement) If splitter IsNot Nothing Then Me.RadGanttView1.GanttViewElement.TextViewElement.Scroller.Scrollbar.Value = Me.RadGanttView1.GanttViewElement.GraphicalViewElement.VScrollBar.Value End If End Sub
To reproduce: Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'WeddingPlannerDataSet.Tasks' table. You can move, or remove it, as needed. Me.TasksTableAdapter.Fill(Me.WeddingPlannerDataSet.Tasks) 'TODO: This line of code loads data into the 'WeddingPlannerDataSet.Links' table. You can move, or remove it, as needed. Me.LinksTableAdapter.Fill(Me.WeddingPlannerDataSet.Links) 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 = Me.WeddingPlannerDataSet Me.RadGanttView1.Columns.Add("Start") Me.RadGanttView1.Columns.Add("End") Me.RadGanttView1.Ratio = 0.3 Me.RadGanttView1.GanttViewElement.GraphicalViewElement.TimelineStart = New DateTime(2006, 8, 20) Me.RadGanttView1.GanttViewElement.GraphicalViewElement.TimelineEnd = New DateTime(2007, 4, 2) AddHandler Me.RadGanttView1.ItemChildIdNeeded, AddressOf ItemChildIdNeeded AddHandler Me.RadGanttView1.ItemAdding, AddressOf ItemAdding AddHandler Me.RadGanttView1.ItemAdded, AddressOf ItemAdded End Sub Dim integerIdCounter As Integer = 200 Private Sub ItemChildIdNeeded(sender As Object, e As Telerik.WinControls.UI.GanttViewItemChildIdNeededEventArgs) Me.integerIdCounter += 1 e.ChildId = Me.integerIdCounter End Sub Workaround: AddHandler Me.RadGanttView1.ContextMenuOpening, AddressOf RadGanttView1_ContextMenuOpening Private Sub RadGanttView1_ContextMenuOpening(sender As Object, e As Telerik.WinControls.UI.GanttViewContextMenuOpeningEventArgs) Dim item As RadMenuItem = DirectCast(e.Menu.Items(0), RadMenuItem) AddHandler item.Items(0).Click, AddressOf ItemClick End Sub Private Sub ItemClick(sender As Object, e As EventArgs) Me.RadGanttView1.GanttViewElement.GraphicalViewElement.Update(Telerik.WinControls.UI.RadGanttViewElement.UpdateActions.ExpandedChanged) End Sub
Dim data As New DataSet() Dim tasks As New DataTable("Tasks") Dim links As New DataTable("Links") Sub New() InitializeComponent() tasks.Columns.Add("Id", GetType(Integer)) tasks.Columns.Add("ParentId", GetType(Integer)) tasks.Columns.Add("Title", GetType(String)) tasks.Columns.Add("Start", GetType(DateTime)) tasks.Columns.Add("End", GetType(DateTime)) tasks.Columns.Add("Progress", GetType(Decimal)) links.Columns.Add("StartId", GetType(Integer)) links.Columns.Add("EndId", GetType(Integer)) links.Columns.Add("LinkType", GetType(Integer)) data.Tables.Add(tasks) data.Tables.Add(links) tasks.Rows.Add(1, 0, "1. Summary task title", New DateTime(2010, 10, 10), New DateTime(2010, 10, 15), 30D) tasks.Rows.Add(2, 1, "1.1 Task", New DateTime(2010, 10, 10), New DateTime(2010, 10, 12), 10) tasks.Rows.Add(3, 1, "1.2 Task", New DateTime(2010, 10, 12), New DateTime(2010, 10, 15), 20D) tasks.Rows.Add(4, 1, "1.3 Task", New DateTime(2010, 10, 10), New DateTime(2010, 10, 11), 20D) tasks.Rows.Add(5, 1, "Milestone", New DateTime(2010, 10, 15), New DateTime(2010, 10, 15), 0D) tasks.Rows.Add(6, 0, "2. Summary task title", New DateTime(2010, 10, 10), New DateTime(2010, 10, 13), 30D) tasks.Rows.Add(7, 6, "2.1 Task", New DateTime(2010, 10, 10), New DateTime(2010, 10, 11), 10) links.Rows.Add(2, 3, 1) links.Rows.Add(3, 5, 1) Bind() Me.RadGanttView1.Columns.Add("Start") Me.RadGanttView1.Columns.Add("End") Me.RadGanttView1.Columns.Add("Id") Me.RadGanttView1.Columns.Add("ParentId") Me.RadGanttView1.GanttViewElement.GraphicalViewElement.TimelineStart = New DateTime(2010, 10, 9) End Sub Private Sub Bind() Me.RadGanttView1.GanttViewElement.DataSource = Nothing 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 = data End Sub Private Sub RadButtonClick(sender As Object, e As EventArgs) Handles RadButton2.Click tasks(3)("ParentId") = 6 Bind() End Sub Workaround: rebind the ganttview after changing the parent.