Tutorial: Scheduler with Sortable Columns for ASP.NET MVC 5

How to activate resource column sorting in the ASP.NET MVC scheduler component. Sample Visual Studio 2012 solution available for download (C#, SQL Server).
Apr 2, 2014
scheduler sortable columns asp.net mvc 5

Tutorial:

Features

  • ASP.NET MVC 5 scheduler
  • Time on the horizontal axis
  • Resources (rooms, people, machines) on the vertical axis
  • Additional resource data in columns (Name, Id)
  • Clicking the column header sorts the resources
  • Visual Studio 2012 sample project
  • C# source code of the sample included

Activating the column headers (C# sample):

@Html.DayPilotScheduler("dps", new DayPilotSchedulerConfig
{
    BackendUrl = Url.Content("~/Scheduler/Backend"),
    ...
    HeaderColumns= new RowHeaderColumnCollection {
        new RowHeaderColumn("<a href='javascript:dps.commandCallBack(\"sort\", { field: \"name\" }); '>Name</a>", 80),
        new RowHeaderColumn("<a href='javascript:dps.commandCallBack(\"sort\", { field: \"id\" });'>Id</a>", 80)
    }
})

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java