Approved
Last Updated: 29 Mar 2016 14:25 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 16 Dec 2015 08:34
Category: GanttView
Type: Bug Report
0
FIX. RadGanttView - visual glitch when adding a new item
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
Attached Files:
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments