TMS Web Planner code behind database binding [TMS Tut Part 2]

On Solutions Explorer, right-click the Planner.aspx file. Select View Code on the popup.

The aspx code behind is still raw, so first we need to add essential references like TMS.WebPlanner and TMS.WebPlanner.Design.

Code behind header should have these lines:
using TMS.WebPlanner;
using TMS.WebPlanner.Design;

To connect our database to the webplanner. We put this following lines on the Page_Load method:
WebPlanner1.DataSource = AccessDataSource1;

This connects the Access DataSource object we added earlier to our TMS WebPlanner.

These WebPlanner properties need to be defined in Page_Load.
WebPlanner1.KeyField = "ID";
WebPlanner1.StartTimeField = "StartTime";
WebPlanner1.EndTimeField = "EndTime";
WebPlanner1.SubjectField = "Subject";
WebPlanner1.NotesField = "Notes";

Lastly! we add this line to complete the data bindings.
WebPlanner1.DataBind();


On the 3rd part of this tutorial, I will teach you how to create the WebPlanner events. ;)

Comments

Popular posts from this blog

Setting up TMS Web Planner and Access Database [TMS Tut Part 1]

Converting JSON API returned data into 2016 SQL table rows

OOTB Valvrave III Hikaminari 1/144 Review