search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Issue with Duplicate rows in gantt daypilot scheduler

Asked by Novice user
6 years ago.

I'm new to using daypilot and a novice vb.net developer. I've got the demo setup, but seem to have an issue with with duplicate rows in the sample scheduler. it loads the row properly in the scheduler, but shows a duplicate for each row.

any help with this would be great. thanks so much!

example:

i have two requests "Request 1 and Request 2"

Scheduler

NAME March12 March 20 March 25 March 30

Request 1 XXXXXXXXXXXXXXXXXXXXXXX xxxxxxxxxxxxxxxxxx
Request 1 XXXXXXXXXXXXXXXXXXXXXXX xxxxxxxxxxxxxxxxxx
Request 2 XXXXXXXXXXX xxxxxxxxxxxxxxxxxx
Request 2 XXXXXXXXXXX xxxxxxxxxxxxxxxxxx

Here's my default.aspx page:

<DayPilot:DayPilotScheduler
runat="server"
ID="GanttControl"
ViewType="Gantt"
Scale="Day" DataEndField="eventend" DataIdField="id"
DataStartField="eventstart" DataTextField="name" style="top: 0px; left: 1px"
TimeRangeSelectedHandling="Disabled"
Days="60" EventHeight="30" BlockOnCallBack="True" DataResourceField="status_id" EventSortExpression="">
<TimeHeaders>
<DayPilot:TimeHeader GroupBy="Month" Format="MMMM yyyy" />
<DayPilot:TimeHeader GroupBy="Cell" />
</TimeHeaders>
<HeaderColumns>
<DayPilot:RowHeaderColumn Title="NAME" Width="120" />

</HeaderColumns>
</DayPilot:DayPilotScheduler>

Here's my code:

Private Sub _Default_Load(sender As Object, e As EventArgs) Handles Me.Load

If Not IsPostBack Then

SetDataSourceAndBind()
End If

End Sub

Private Sub SetDataSourceAndBind()
GanttControl.DataSource = GetData(GanttControl.StartDate, GanttControl.EndDate)
GanttControl.DataStartField = "start_date"
GanttControl.DataEndField = "end_date"
GanttControl.DataIdField = "status_id"
GanttControl.DataTextField = "name"
GanttControl.DataBind()

End Sub

Private Function GetData(ByVal start As Date, ByVal [end] As Date) As DataTable
Dim myConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("MYConnectionString").ConnectionString)
Dim da As New SqlDataAdapter("Select status_id, name, start_date,end_date FROM [status] WHERE Not (([end_date] <= @start) Or ([start_date] >= @End)) group by status_id,name,start_date,end_date", myConnection)

da.SelectCommand.Parameters.AddWithValue("start", start)
da.SelectCommand.Parameters.AddWithValue("End", [end])
Dim dt As New DataTable()
da.Fill(dt)

Return dt

End Function

Comment posted by Dan Letecky [DayPilot]
6 years ago.

If you open the output HTML page, how does the Scheduler initialization code looks like - especially v.resources and v.events.list?

Comment posted by Scott
6 years ago.

Here is the default.aspx page

/* DayPilotPro: DayPilot, Version=8.4.3622.1, Culture=neutral, PublicKeyToken=426941954f05e7fe */
function GanttControl_Init() {
var v = new DayPilot.Scheduler('GanttControl');
v.allowEventOverlap = true;
v.allowMultiMove = false;
v.allowMultiRange = false;
v.allowMultiSelect = true;
v.api = 1;
v.afterRenderData = null;
v.autoRefreshCommand = "refresh";
v.autoRefreshEnabled = false;
v.autoRefreshInterval = 60;
v.autoRefreshMaxCount = 20;
v.autoScroll = "Drag";
v.blockOnCallBack = true;
v.borderColor = "#000000";
v.businessBeginsHour = 9;
v.businessEndsHour = 18;
v.businessWeekends = false;
v.cellBackColor = "#FFFFD5";
v.cellBackColorNonBusiness = "#FFF4BC";
v.cellBorderColor = "#EAD098";
v.cellDuration = 60;
v.cellGroupBy = "Day";
v.cellSelectColor = "#316AC5";
v.cellSweeping = true;
v.cellSweepingCacheSize = 1000;
v.cellWidth = 40;
v.cellWidthMin = 1;
v.cellWidthSpec = "Fixed";
v.cornerHtml = "";
v.cornerBackColor = "";
v.crosshairColor = "Gray";
v.crosshairOpacity = 20;
v.crosshairType = "Header";
v.theme = "scheduler_default";
v.days = 60;
v.doubleClickTimeout = 300;
v.dragOutAllowed = false;
v.durationBarColor = "Blue";
v.durationBarHeight = 3;
v.durationBarMode = "Duration";
v.durationBarVisible = true;
v.dynamicEventRendering = "Progressive";
v.dynamicEventRenderingCacheSweeping = false;
v.dynamicEventRenderingCacheSize = 200;
v.dynamicEventRenderingMargin = 50;
v.dynamicLoading = false;
v.emptyBackColor = "#FFFFFF";
v.eventBorderColor = "#000000";
v.eventBorderVisible = true;
v.eventBackColor = "#FFFFFF";
v.eventCorners = "Regular";
v.eventEditMinWidth = 100;
v.eventEndSpec = "DateTime";
v.eventFontColor = "#000000";
v.eventFontFamily = "Tahoma";
v.eventFontSize = "7pt";
v.eventHeight = 30;
v.eventMoveMargin = 5;
v.eventMoveSkipNonBusiness = false;
v.eventMoveToPosition = false;
v.eventResizeMargin = 5;
v.eventStackingLineHeight = 100;
v.eventTapAndHoldHandling = "Move";
v.events.list = [{"doubleClickDisabled":true,"moveVDisabled":true,"resizeDisabled":true,"text":"A419972-FCCS1-planning","moveHDisabled":true,"resource":null,"end":"2018-03-31T00:00:00","tag":null,"start":"2018-03-01T00:00:00","moveDisabled":true,"id":"1","deleteDisabled":true,"clickDisabled":true},{"doubleClickDisabled":true,"moveVDisabled":true,"resizeDisabled":true,"text":"A419972-FCCS1-planning","moveHDisabled":true,"resource":null,"end":"2018-04-12T00:00:00","tag":null,"start":"2018-04-01T00:00:00","moveDisabled":true,"id":"1","deleteDisabled":true,"clickDisabled":true},{"doubleClickDisabled":true,"moveVDisabled":true,"resizeDisabled":true,"text":"A419972-FCCS2-planning3","moveHDisabled":true,"resource":null,"end":"2018-03-31T00:00:00","tag":null,"start":"2018-03-26T00:00:00","moveDisabled":true,"id":"3","deleteDisabled":true,"clickDisabled":true},{"doubleClickDisabled":true,"moveVDisabled":true,"resizeDisabled":true,"text":"A419972-FCCS2-planning3","moveHDisabled":true,"resource":null,"end":"2018-04-05T00:00:00","tag":null,"start":"2018-04-02T00:00:00","moveDisabled":true,"id":"3","deleteDisabled":true,"clickDisabled":true},{"doubleClickDisabled":true,"moveVDisabled":true,"resizeDisabled":true,"text":"TEST","moveHDisabled":true,"resource":null,"end":"2018-04-20T00:00:00","tag":null,"start":"2018-04-18T00:00:00","moveDisabled":true,"id":"4","deleteDisabled":true,"clickDisabled":true},{"doubleClickDisabled":true,"moveVDisabled":true,"resizeDisabled":true,"text":"TEST","moveHDisabled":true,"resource":null,"end":"2018-04-28T00:00:00","tag":null,"start":"2018-04-26T00:00:00","moveDisabled":true,"id":"4","deleteDisabled":true,"clickDisabled":true}];
v.links.list = [];
v.floatingEvents = true;
v.floatingTimeHeaders = true;
v.groupConcurrentEvents = false;
v.groupConcurrentEventsLimit = 1;
v.headerFontColor = "#000000";
v.headerFontFamily = "Tahoma";
v.headerFontSize = "10pt";
v.headerHeight = 20;
v.height = 0;
v.heightSpec = "Auto";
v.hourBorderColor = "#EAD098";
v.hourFontFamily = "Tahoma";
v.hourFontSize = "10pt";
v.hourNameBackColor = "#ECE9D8";
v.hourNameBorderColor = "#ACA899";
v.initEventEnabled = false;
v.loadingLabelText = "Loading...";
v.loadingLabelVisible = true;
v.loadingLabelFontSize = "10pt";
v.loadingLabelFontFamily = "Tahoma";
v.loadingLabelFontColor = "#FFFFFF";
v.loadingLabelBackColor = "Red";
v.scrollX = 0;
v.scrollY = 0;
v.selectedRows = [];
v.snapToGrid = true;
v.layout = "Auto";
v.messageHideAfter = 5000;
v.messageBarPosition = "Top";
v.moveBy = "Full";
v.multiSelectRectangle = "Disabled";
v.notifyCommit = "Immediate";
v.numberFormat = "0.00";
v.overrideWheelScrolling = false;
v.progressiveRowRendering = true;
v.progressiveRowRenderingPreload = 25;
v.resources = [{"id":"1","areas":null,"html":"A419972-FCCS1-planning","name":"A419972-FCCS1-planning"},{"id":"1","areas":null,"html":"A419972-FCCS1-planning","name":"A419972-FCCS1-planning"},{"id":"3","areas":null,"html":"A419972-FCCS2-planning3","name":"A419972-FCCS2-planning3"},{"id":"3","areas":null,"html":"A419972-FCCS2-planning3","name":"A419972-FCCS2-planning3"},{"id":"4","areas":null,"html":"TEST","name":"TEST"},{"id":"4","areas":null,"html":"TEST","name":"TEST"}];
v.rowCreateHtml = "New row...";
v.rowMarginBottom = 0;
v.rowMinHeight = 0;
v.rowHeaderColumns = [{"width":120,"title":"POD"}];
v.rowHeaderHideIconEnabled = false;
v.rowHeaderScrolling = false;
v.rowHeaderWidth = 80;
v.rowHeaderWidthAutoFit = true;
v.rowHeaderCols = null;
v.scale = "Day";
v.scrollDelayDynamic = 500;
v.scrollDelayCells = 20;
v.scrollDelayEvents = 200;
v.scrollDelayFloats = 0;
v.separators = [];
v.shadow = "Fill";
v.showBaseTimeHeader = true;
v.showNonBusiness = true;
v.showToolTip = true;
v.sortDirections = [];
v.startDate = "2018-03-26T00:00:00";
v.syncResourceTree = true;
v.syncLinks = true;
v.timeBreakColor = "#000000";
v.timeFormat = "Clock12Hours";
v.timeHeader = [[{"end":"2018-04-01T00:00:00","innerHTML":"March 2018","left":0,"width":240,"start":"2018-03-26T00:00:00"},{"end":"2018-05-01T00:00:00","innerHTML":"April 2018","left":240,"width":1200,"start":"2018-04-01T00:00:00"},{"end":"2018-05-25T00:00:00","innerHTML":"May 2018","left":1440,"width":960,"start":"2018-05-01T00:00:00"}],[{"end":"2018-03-27T00:00:00","innerHTML":"26","left":0,"width":40,"start":"2018-03-26T00:00:00"},{"end":"2018-03-28T00:00:00","innerHTML":"27","left":40,"width":40,"start":"2018-03-27T00:00:00"},{"end":"2018-03-29T00:00:00","innerHTML":"28","left":80,"width":40,"start":"2018-03-28T00:00:00"},{"end":"2018-03-30T00:00:00","innerHTML":"29","left":120,"width":40,"start":"2018-03-29T00:00:00"},{"end":"2018-03-31T00:00:00","innerHTML":"30","left":160,"width":40,"start":"2018-03-30T00:00:00"},{"end":"2018-04-01T00:00:00","innerHTML":"31","left":200,"width":40,"start":"2018-03-31T00:00:00"},{"end":"2018-04-02T00:00:00","innerHTML":"1","left":240,"width":40,"start":"2018-04-01T00:00:00"},{"end":"2018-04-03T00:00:00","innerHTML":"2","left":280,"width":40,"start":"2018-04-02T00:00:00"},{"end":"2018-04-04T00:00:00","innerHTML":"3","left":320,"width":40,"start":"2018-04-03T00:00:00"},{"end":"2018-04-05T00:00:00","innerHTML":"4","left":360,"width":40,"start":"2018-04-04T00:00:00"},{"end":"2018-04-06T00:00:00","innerHTML":"5","left":400,"width":40,"start":"2018-04-05T00:00:00"},{"end":"2018-04-07T00:00:00","innerHTML":"6","left":440,"width":40,"start":"2018-04-06T00:00:00"},{"end":"2018-04-08T00:00:00","innerHTML":"7","left":480,"width":40,"start":"2018-04-07T00:00:00"},{"end":"2018-04-09T00:00:00","innerHTML":"8","left":520,"width":40,"start":"2018-04-08T00:00:00"},{"end":"2018-04-10T00:00:00","innerHTML":"9","left":560,"width":40,"start":"2018-04-09T00:00:00"},{"end":"2018-04-11T00:00:00","innerHTML":"10","left":600,"width":40,"start":"2018-04-10T00:00:00"},{"end":"2018-04-12T00:00:00","innerHTML":"11","left":640,"width":40,"start":"2018-04-11T00:00:00"},{"end":"2018-04-13T00:00:00","innerHTML":"12","left":680,"width":40,"start":"2018-04-12T00:00:00"},{"end":"2018-04-14T00:00:00","innerHTML":"13","left":720,"width":40,"start":"2018-04-13T00:00:00"},{"end":"2018-04-15T00:00:00","innerHTML":"14","left":760,"width":40,"start":"2018-04-14T00:00:00"},{"end":"2018-04-16T00:00:00","innerHTML":"15","left":800,"width":40,"start":"2018-04-15T00:00:00"},{"end":"2018-04-17T00:00:00","innerHTML":"16","left":840,"width":40,"start":"2018-04-16T00:00:00"},{"end":"2018-04-18T00:00:00","innerHTML":"17","left":880,"width":40,"start":"2018-04-17T00:00:00"},{"end":"2018-04-19T00:00:00","innerHTML":"18","left":920,"width":40,"start":"2018-04-18T00:00:00"},{"end":"2018-04-20T00:00:00","innerHTML":"19","left":960,"width":40,"start":"2018-04-19T00:00:00"},{"end":"2018-04-21T00:00:00","innerHTML":"20","left":1000,"width":40,"start":"2018-04-20T00:00:00"},{"end":"2018-04-22T00:00:00","innerHTML":"21","left":1040,"width":40,"start":"2018-04-21T00:00:00"},{"end":"2018-04-23T00:00:00","innerHTML":"22","left":1080,"width":40,"start":"2018-04-22T00:00:00"},{"end":"2018-04-24T00:00:00","innerHTML":"23","left":1120,"width":40,"start":"2018-04-23T00:00:00"},{"end":"2018-04-25T00:00:00","innerHTML":"24","left":1160,"width":40,"start":"2018-04-24T00:00:00"},{"end":"2018-04-26T00:00:00","innerHTML":"25","left":1200,"width":40,"start":"2018-04-25T00:00:00"},{"end":"2018-04-27T00:00:00","innerHTML":"26","left":1240,"width":40,"start":"2018-04-26T00:00:00"},{"end":"2018-04-28T00:00:00","innerHTML":"27","left":1280,"width":40,"start":"2018-04-27T00:00:00"},{"end":"2018-04-29T00:00:00","innerHTML":"28","left":1320,"width":40,"start":"2018-04-28T00:00:00"},{"end":"2018-04-30T00:00:00","innerHTML":"29","left":1360,"width":40,"start":"2018-04-29T00:00:00"},{"end":"2018-05-01T00:00:00","innerHTML":"30","left":1400,"width":40,"start":"2018-04-30T00:00:00"},{"end":"2018-05-02T00:00:00","innerHTML":"1","left":1440,"width":40,"start":"2018-05-01T00:00:00"},{"end":"2018-05-03T00:00:00","innerHTML":"2","left":1480,"width":40,"start":"2018-05-02T00:00:00"},{"end":"2018-05-04T00:00:00","innerHTML":"3","left":1520,"width":40,"start":"2018-05-03T00:00:00"},{"end":"2018-05-05T00:00:00","innerHTML":"4","left":1560,"width":40,"start":"2018-05-04T00:00:00"},{"end":"2018-05-06T00:00:00","innerHTML":"5","left":1600,"width":40,"start":"2018-05-05T00:00:00"},{"end":"2018-05-07T00:00:00","innerHTML":"6","left":1640,"width":40,"start":"2018-05-06T00:00:00"},{"end":"2018-05-08T00:00:00","innerHTML":"7","left":1680,"width":40,"start":"2018-05-07T00:00:00"},{"end":"2018-05-09T00:00:00","innerHTML":"8","left":1720,"width":40,"start":"2018-05-08T00:00:00"},{"end":"2018-05-10T00:00:00","innerHTML":"9","left":1760,"width":40,"start":"2018-05-09T00:00:00"},{"end":"2018-05-11T00:00:00","innerHTML":"10","left":1800,"width":40,"start":"2018-05-10T00:00:00"},{"end":"2018-05-12T00:00:00","innerHTML":"11","left":1840,"width":40,"start":"2018-05-11T00:00:00"},{"end":"2018-05-13T00:00:00","innerHTML":"12","left":1880,"width":40,"start":"2018-05-12T00:00:00"},{"end":"2018-05-14T00:00:00","innerHTML":"13","left":1920,"width":40,"start":"2018-05-13T00:00:00"},{"end":"2018-05-15T00:00:00","innerHTML":"14","left":1960,"width":40,"start":"2018-05-14T00:00:00"},{"end":"2018-05-16T00:00:00","innerHTML":"15","left":2000,"width":40,"start":"2018-05-15T00:00:00"},{"end":"2018-05-17T00:00:00","innerHTML":"16","left":2040,"width":40,"start":"2018-05-16T00:00:00"},{"end":"2018-05-18T00:00:00","innerHTML":"17","left":2080,"width":40,"start":"2018-05-17T00:00:00"},{"end":"2018-05-19T00:00:00","innerHTML":"18","left":2120,"width":40,"start":"2018-05-18T00:00:00"},{"end":"2018-05-20T00:00:00","innerHTML":"19","left":2160,"width":40,"start":"2018-05-19T00:00:00"},{"end":"2018-05-21T00:00:00","innerHTML":"20","left":2200,"width":40,"start":"2018-05-20T00:00:00"},{"end":"2018-05-22T00:00:00","innerHTML":"21","left":2240,"width":40,"start":"2018-05-21T00:00:00"},{"end":"2018-05-23T00:00:00","innerHTML":"22","left":2280,"width":40,"start":"2018-05-22T00:00:00"},{"end":"2018-05-24T00:00:00","innerHTML":"23","left":2320,"width":40,"start":"2018-05-23T00:00:00"},{"end":"2018-05-25T00:00:00","innerHTML":"24","left":2360,"width":40,"start":"2018-05-24T00:00:00"}]];
v.timeline = [{"end":"2018-03-27T00:00:00","width":40,"left":0,"start":"2018-03-26T00:00:00"},{"end":"2018-03-28T00:00:00","width":40,"left":40,"start":"2018-03-27T00:00:00"},{"end":"2018-03-29T00:00:00","width":40,"left":80,"start":"2018-03-28T00:00:00"},{"end":"2018-03-30T00:00:00","width":40,"left":120,"start":"2018-03-29T00:00:00"},{"end":"2018-03-31T00:00:00","width":40,"left":160,"start":"2018-03-30T00:00:00"},{"end":"2018-04-01T00:00:00","width":40,"left":200,"start":"2018-03-31T00:00:00"},{"end":"2018-04-02T00:00:00","width":40,"left":240,"start":"2018-04-01T00:00:00"},{"end":"2018-04-03T00:00:00","width":40,"left":280,"start":"2018-04-02T00:00:00"},{"end":"2018-04-04T00:00:00","width":40,"left":320,"start":"2018-04-03T00:00:00"},{"end":"2018-04-05T00:00:00","width":40,"left":360,"start":"2018-04-04T00:00:00"},{"end":"2018-04-06T00:00:00","width":40,"left":400,"start":"2018-04-05T00:00:00"},{"end":"2018-04-07T00:00:00","width":40,"left":440,"start":"2018-04-06T00:00:00"},{"end":"2018-04-08T00:00:00","width":40,"left":480,"start":"2018-04-07T00:00:00"},{"end":"2018-04-09T00:00:00","width":40,"left":520,"start":"2018-04-08T00:00:00"},{"end":"2018-04-10T00:00:00","width":40,"left":560,"start":"2018-04-09T00:00:00"},{"end":"2018-04-11T00:00:00","width":40,"left":600,"start":"2018-04-10T00:00:00"},{"end":"2018-04-12T00:00:00","width":40,"left":640,"start":"2018-04-11T00:00:00"},{"end":"2018-04-13T00:00:00","width":40,"left":680,"start":"2018-04-12T00:00:00"},{"end":"2018-04-14T00:00:00","width":40,"left":720,"start":"2018-04-13T00:00:00"},{"end":"2018-04-15T00:00:00","width":40,"left":760,"start":"2018-04-14T00:00:00"},{"end":"2018-04-16T00:00:00","width":40,"left":800,"start":"2018-04-15T00:00:00"},{"end":"2018-04-17T00:00:00","width":40,"left":840,"start":"2018-04-16T00:00:00"},{"end":"2018-04-18T00:00:00","width":40,"left":880,"start":"2018-04-17T00:00:00"},{"end":"2018-04-19T00:00:00","width":40,"left":920,"start":"2018-04-18T00:00:00"},{"end":"2018-04-20T00:00:00","width":40,"left":960,"start":"2018-04-19T00:00:00"},{"end":"2018-04-21T00:00:00","width":40,"left":1000,"start":"2018-04-20T00:00:00"},{"end":"2018-04-22T00:00:00","width":40,"left":1040,"start":"2018-04-21T00:00:00"},{"end":"2018-04-23T00:00:00","width":40,"left":1080,"start":"2018-04-22T00:00:00"},{"end":"2018-04-24T00:00:00","width":40,"left":1120,"start":"2018-04-23T00:00:00"},{"end":"2018-04-25T00:00:00","width":40,"left":1160,"start":"2018-04-24T00:00:00"},{"end":"2018-04-26T00:00:00","width":40,"left":1200,"start":"2018-04-25T00:00:00"},{"end":"2018-04-27T00:00:00","width":40,"left":1240,"start":"2018-04-26T00:00:00"},{"end":"2018-04-28T00:00:00","width":40,"left":1280,"start":"2018-04-27T00:00:00"},{"end":"2018-04-29T00:00:00","width":40,"left":1320,"start":"2018-04-28T00:00:00"},{"end":"2018-04-30T00:00:00","width":40,"left":1360,"start":"2018-04-29T00:00:00"},{"end":"2018-05-01T00:00:00","width":40,"left":1400,"start":"2018-04-30T00:00:00"},{"end":"2018-05-02T00:00:00","width":40,"left":1440,"start":"2018-05-01T00:00:00"},{"end":"2018-05-03T00:00:00","width":40,"left":1480,"start":"2018-05-02T00:00:00"},{"end":"2018-05-04T00:00:00","width":40,"left":1520,"start":"2018-05-03T00:00:00"},{"end":"2018-05-05T00:00:00","width":40,"left":1560,"start":"2018-05-04T00:00:00"},{"end":"2018-05-06T00:00:00","width":40,"left":1600,"start":"2018-05-05T00:00:00"},{"end":"2018-05-07T00:00:00","width":40,"left":1640,"start":"2018-05-06T00:00:00"},{"end":"2018-05-08T00:00:00","width":40,"left":1680,"start":"2018-05-07T00:00:00"},{"end":"2018-05-09T00:00:00","width":40,"left":1720,"start":"2018-05-08T00:00:00"},{"end":"2018-05-10T00:00:00","width":40,"left":1760,"start":"2018-05-09T00:00:00"},{"end":"2018-05-11T00:00:00","width":40,"left":1800,"start":"2018-05-10T00:00:00"},{"end":"2018-05-12T00:00:00","width":40,"left":1840,"start":"2018-05-11T00:00:00"},{"end":"2018-05-13T00:00:00","width":40,"left":1880,"start":"2018-05-12T00:00:00"},{"end":"2018-05-14T00:00:00","width":40,"left":1920,"start":"2018-05-13T00:00:00"},{"end":"2018-05-15T00:00:00","width":40,"left":1960,"start":"2018-05-14T00:00:00"},{"end":"2018-05-16T00:00:00","width":40,"left":2000,"start":"2018-05-15T00:00:00"},{"end":"2018-05-17T00:00:00","width":40,"left":2040,"start":"2018-05-16T00:00:00"},{"end":"2018-05-18T00:00:00","width":40,"left":2080,"start":"2018-05-17T00:00:00"},{"end":"2018-05-19T00:00:00","width":40,"left":2120,"start":"2018-05-18T00:00:00"},{"end":"2018-05-20T00:00:00","width":40,"left":2160,"start":"2018-05-19T00:00:00"},{"end":"2018-05-21T00:00:00","width":40,"left":2200,"start":"2018-05-20T00:00:00"},{"end":"2018-05-22T00:00:00","width":40,"left":2240,"start":"2018-05-21T00:00:00"},{"end":"2018-05-23T00:00:00","width":40,"left":2280,"start":"2018-05-22T00:00:00"},{"end":"2018-05-24T00:00:00","width":40,"left":2320,"start":"2018-05-23T00:00:00"},{"end":"2018-05-25T00:00:00","width":40,"left":2360,"start":"2018-05-24T00:00:00"}];
v.timeHeaders = [{"groupBy":"Month","format":"MMMM yyyy"},{"groupBy":"Cell"}];
v.treeEnabled = false;
v.treeIndent = 20;
v.treeImageCollapse = "";
v.treeImageExpand = "";
v.treeImageNoChildren = "";
v.treeImageMarginLeft = 2;
v.treeImageMarginTop = 2;
v.treePreventParentUsage = false;
v.treeAutoExpand = true;
v.uniqueID = "GanttControl";
v.useEventBoxes = "Always";
v.viewType = "Gantt";
v.visible = true;
v.weekStarts = 0;
v.eventMovingStartEndEnabled = false;
v.eventResizingStartEndEnabled = false;
v.timeRangeSelectingStartEndEnabled = false;
v.eventMovingStartEndFormat = "MMMM d, yyyy";
v.eventResizingStartEndFormat = "MMMM d, yyyy";
v.timeRangeSelectingStartEndFormat = "MMMM d, yyyy";
v.callbackError = function(result, context) { alert('An exception was thrown in the server-side event handler:\n\n' + result.substring(result.indexOf('$$$')+3)); };
v.afterEventRender = function(e, div) {};
v.afterRender = function(data, isCallBack) {};
v.eventClickHandling = "Disabled";
v.onEventClick = function(e) {alert('Event with id ' + e.value() + ' clicked.')};
v.eventHoverHandling = "Bubble";
v.eventDoubleClickHandling = "Disabled";
v.onEventDoubleClick = function(e) {alert('Event with id ' + e.value() + ' double-clicked.')};
v.eventRightClickHandling = "ContextMenu";
v.onEventRightClick = function(e) {alert('Event with id ' + e.value() + ' clicked.')};
v.eventResizeHandling = "Disabled";
v.onEventResize = function(e, newStart, newEnd) { alert('Event with id ' + e.value() + ' was resized.');};
v.onEventResizing = function(args) { };
v.eventSelectHandling = "Disabled";
v.onEventSelect = function(e, change) {alert('Event selected.')};
v.eventMoveHandling = "Disabled";
v.onEventMove = function(e, newStart, newEnd, newResource, external, ctrl, shift) { var newColumn = newResource; alert('Event with id ' + e.value() + ' was moved.');};
v.onEventMoving = function(args) { };
v.timeRangeSelectedHandling = "Disabled";
v.onTimeRangeSelected = function(start, end, resource) { var column = resource; alert(start.toString() + '\n' + end.toString() + '\n' + column);};
v.onTimeRangeSelecting = function(args) { };
v.timeRangeDoubleClickHandling = "Disabled";
v.onTimeRangeDoubleClick = function(start, end, resource) {alert(start.toString() + '\n' + end.toString() + '\n' + resource);};
v.eventEditHandling = "Disabled";
v.onEventEdit = function(e, newText) {alert('The text of event ' + e.value() + ' was changed to ' + newText + '.');};
v.eventDeleteHandling = "Disabled";
v.onEventDelete = function(e) {};
v.rowClickHandling = "Disabled";
v.onRowClick = function(row) { var resource = row; };
v.rowDoubleClickHandling = "Disabled";
v.onRowDoubleClick = function(row) { var resource = row; };
v.timeHeaderClickHandling = "Disabled";
v.onTimeHeaderClick = function(header) {alert('Time header clicked: ' + header.start + '.')};
v.resourceCollapseHandling = "Disabled";
v.onResourceCollapse = function(resource) {alert('Resource collapsed:' + resource.value)};
v.resourceExpandHandling = "Disabled";
v.onResourceExpand = function(resource) {alert('Resource expanded:' + resource.value)};
v.rowSelectHandling = "Disabled";
v.onRowSelect = function(row, change) {};
v.rowEditHandling = "Disabled";
v.onRowEdit = function(row, newText) { var resource = row; };
v.rowCreateHandling = "Disabled";
v.onRowCreate = function(args) { };
v.onRowFilter = function(args) { };
v.rowMoveHandling = "Disabled";
v.onRowMove = function(source, target, position) { };
v.onAutoRefresh = function(args) {};
v.onCallBackStart = function(args) {};
v.onCallBackEnd = function(args) {};
v.cellProperties = {"5_0":{"business":0},"6_0":{"business":0},"12_0":{"business":0},"13_0":{"business":0},"19_0":{"business":0},"20_0":{"business":0},"26_0":{"business":0},"27_0":{"business":0},"33_0":{"business":0},"34_0":{"business":0},"40_0":{"business":0},"41_0":{"business":0},"47_0":{"business":0},"48_0":{"business":0},"54_0":{"business":0},"55_0":{"business":0}};
v.cellConfig = {"vertical":true,"horizontal":false,"x":60,"default":{"business":1},"y":6};
v.hashes = {"corner":"XpLeJTKeDdsTx8M9WrJh+XLvb+4=","callBack":"yk3Vg8dFLj4SGZFtg5Xv1dVg+E4=","colors":"FnMVXr3D58G1qeMjqojj7gCPk\/0=","separators":"l9Fw4VUO7kr8CvBlt4zaMCqXZ0w=","timeHeader":"+StK6SbRYj2\/7SqXurktEpBJWtk="};
v.init();
return v.internal.initialized() ? v : null;
}
var GanttControl = GanttControl_Init() || GanttControl;
</script>

Answer posted by Dan Letecky [DayPilot]
6 years ago.

It looks like your SQL select produces two rows for every item. Have you tried checking the data set?

There are a couple of things to review:

1. Do you intend to display multiple items per row? Then don't use ViewType="Gantt" which is designed to display one item per row.

2. The "DataIdField" is set to "status_id". I'm not sure what you are trying to display but this doesn't look like the correct field. DataIdField should point to a field that holds a unique identifier of an event.

3. I've also noticed that there is a "GROUP BY" section in your SQL select but no aggregate function is used.

Comment posted by Scott
6 years ago.

Thanks Dan.

which viewtype should I use to display multiple items per row? my end result is to display multiple start/end dates for each row.

Comment posted by Dan Letecky [DayPilot]
6 years ago.

You should use the default "Resources" view type:
https://doc.daypilot.org/scheduler/resources/

You need to define rows using Resources property and load events using DataSource/DataBind(). The event resource id (DataResourceField) needs to match Resources[].Id value. The events will be displayed in the matching row.

See also:
https://doc.daypilot.org/scheduler/resource-loading/
https://doc.daypilot.org/scheduler/event-loading/

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.