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

VB .Net and no database.

Asked by Alan
11 years ago.

Hello,

Can you please give me an example of how to add an appointment to a DayPilot Lite calendar

  • using VB .Net, and,
  • without using any SQL database.

Thanks,

  • Alan.
Answer posted by Dan Letecky [DayPilot]
11 years ago.

You need to store the list of events somewhere (at least in memory, or in a XML file). This list needs to be persisted between requests. You add the event to the calendar by adding it to the list and calling DataBind()

The list can be a simple ArrayList of custom objects. You have to assign this list to .DataSource property:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If (Not IsPostBack) Then
            DayPilotCalendar1.DataSource = GetMyList()
            DayPilotCalendar1.DataBind()
        End If

    End Sub

You also need to map the custom object properties to the required fields:

DayPilotCalendar1.DataStartField = "Start"
DayPilotCalendar1.DataEndField = "End"
DayPilotCalendar1.DataValueField = "Id"
DayPilotCalendar1.DataTextField = "Name"

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