Hi,
Been trying to get to grips with the Gantt view control but have been stopped in my tracks by a strange problem.
Basically when I first click on the calendar side of gantt chart when is populated I get:": '65756745' belongs to a different project than the one currently being displayed by the control, and cannot be designated as the ActiveTask." Whatever that means, as I only have one project and it's [unassinged]
If however I click on the grid side first then click the calendar it works fine.
As this is in the experimental stage I can post the code here as its still rather simple:
Public Class frmOffering
Private _SQLOffering As New sqlOffering
#Region "Form events" Private Sub frmOffering_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load _NewOffering = False Dim IntervalSetup As New Infragistics.Win.UltraWinSchedule.DateInterval 'Set up the Gantt chart. ugvOffering.CalendarInfo.CustomTaskColumns.Add("AimRef", GetType(String), True) ugvOffering.CalendarInfo.CustomTaskColumns.Add("Description", GetType(String), True) ugvOffering.CalendarInfo.CustomTaskColumns.Add("AimId", GetType(Integer), True) ugvOffering.GridSettings.ColumnSettings("AimId").Visible = False ugvOffering.AutoDisplayTaskDialog = Infragistics.Win.UltraWinGanttView.AutoDisplayTaskDialog.GridAreaOrChartArea IntervalSetup.SynchronizingDate = gsettings.getSetting("CourseStartDate") IntervalSetup.IntervalUnits = Infragistics.Win.UltraWinSchedule.DateIntervalUnits.Months ugvOffering.TimelineSettings.PrimaryInterval = IntervalSetup 'Populate the offering combobox. ucmbOffering.DataSource = _SQLOffering.LoadOfferingList() End Sub
Private Sub ucmbOffering_Leave(sender As System.Object, e As System.EventArgs) Handles ucmbOffering.Leave, ucmbOffering.AfterCloseUp If ucmbOffering.IsItemInList(ucmbOffering.Text) = True Then LoadOfferingData(ucmbOffering.Value) End If End Sub
#End Region#Region "Internal subs"
Private Sub LoadOfferingData(ByVal OfferingId As Integer) Dim dtOfferingData As New DataTable Dim TaskIndex As Integer = 0 Dim atask As New Infragistics.Win.UltraWinSchedule.Task Dim startdate, enddate As DateTime Dim Duration As Integer 'Get the tasks for the current offering. dtOfferingData = _SQLOffering.GetOfferingData(OfferingId) 'clear the old tasks ugvOffering.CalendarInfo.Tasks.Clear() If IsNothing(dtOfferingData) = False Then 'Assign all the data to the tasks. For Each drow As DataRow In dtOfferingData.Rows startdate = CDate(gsettings.getSetting("CourseStartDate")).AddMonths(drow.Item("StartMonth") - 1) enddate = CDate(gsettings.getSetting("CourseStartDate")).AddMonths(drow.Item("EndMonth") - 1) Duration = DateDiff(DateInterval.Day, startdate, enddate) ugvOffering.CalendarInfo.Tasks.Add(startdate, TimeSpan.FromDays(Duration), Infragistics.Win.TimeSpanFormat.Days, drow.Item("AimRef")) ugvOffering.CalendarInfo.Tasks(TaskIndex).SetCustomProperty("AimRef", drow.Item("AimRef")) ugvOffering.CalendarInfo.Tasks(TaskIndex).SetCustomProperty("Description", drow.Item("AimTitle")) ugvOffering.CalendarInfo.Tasks(TaskIndex).SetCustomProperty("AimId", drow.Item("AimId")) TaskIndex += 1 Next 'Added the below to try and stop the error but it still happens 'ugvOffering.ActiveTask = ugvOffering.CalendarInfo.Tasks(TaskIndex - 1) End If End Sub
#End Region
End Class
Finally, Is it possible to have custom column styles in the grid such as drop downs and buttons, or can I just make a grid and assign it to the control, as the grid that is included is rather restriced.
Thanks
Alex
Hi Dave,
Thanks for such a prompt reply.
The version we are running presently is 13.1.20131.2040 which is an older build i see.
Is this only able to be sorted by upgrading?
many thanks
simon
Hello Simon,
Thank you for contacting Infragistics.
This specific issue was resolved in NetAdvantage 2012 Volume 2 build 2089, NetAdvantage 2013 Volume 1 build 2042, and all released builds of Infragistics 2013 Volume 2. Which version of our controls are you using? To get the build number, look at the "Version" field when viewing a reference's properties.
I too am having a similar issue. Was this ever resolved?
Many Thanks
Simon
Alex,
I have submitted this issue to our developers for further review. The reference number for this issue is 146121. A support case has also been opened for you and you will receive more information on this case through the support case. The reference number for the support case is CAS-118702-W2Z8W5.
Okay thanks for keeping me uptodate, I am working on other parts of the project at the moment but will need this control working at some point.