Click here to Skip to main content
15,886,199 members
Articles / Web Development / HTML

DayPilot Gantt Chart for ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.85/5 (21 votes)
21 Mar 2016Apache3 min read 99.3K   4.2K   62  
How to display AJAX Gantt Chart in ASP.NET application.
Imports System
Imports System.Collections
Imports System.Data
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports DayPilot.Utils
Imports DayPilot.Web.Ui.Enums
Imports Util

Partial Public Class Project_New
	Inherits Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
		If Not IsPostBack Then
			Dim start As Date = Convert.ToDateTime(Request.QueryString("start"))
			TextBoxStart.Text = start.ToShortDateString()
		End If
	End Sub

	Protected Sub ButtonOK_Click(ByVal sender As Object, ByVal e As EventArgs)

		Dim start As Date = Convert.ToDateTime(TextBoxStart.Text)
		Dim duration As Integer = Convert.ToInt32(DropDownListDuration.SelectedValue)
		Dim note As String = TextBoxNote.Text

		CType(New DataManager(), DataManager).CreateAssignment(start, duration, note)

		' passed to the modal dialog close handler, see Scripts/DayPilot/event_handling.js
		Dim ht As New Hashtable()
		ht("refresh") = "yes"
		ht("message") = "Event created."

		Modal.Close(Me, ht)
	End Sub

	Protected Sub ButtonCancel_Click(ByVal sender As Object, ByVal e As EventArgs)
		Modal.Close(Me)
	End Sub
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Czech Republic Czech Republic
My open-source event calendar/scheduling web UI components:

DayPilot for JavaScript, Angular, React and Vue

Comments and Discussions