ASP.NET Calendar - Multi-Month View

15 December 2010

Check out this new demo for the ASP.NET Calendar control that shows you how to display multiple months with one control:

Calendar_ Multi_Month_View

And multiple calendars are all displayed sequentially so your end-users can get a longer view of the time line.

While the demo is new for DXperience v2010.2, this feature has actually been around for 2 years!

Rows and Columns

The Rows and Columns properties of the ASPxCalendar allow you to easily display the multiple calendars.

The Rows and Columns properties can be set in the ASPX markup or the server side. For example, in the demo above, the combo box code that switches the calendar looks like this on the server-side:

switch (ddlColumnsPerRows.SelectedItem.Value.ToString()) { 
    case "2x2":
        calendar.Rows = 2;
        calendar.Columns = 2;
        break;
    case "1x3":
        calendar.Columns = 1;
        calendar.Rows = 3;
        break;
    case "2x1":
        calendar.Columns = 2;
        calendar.Rows = 1;
        break;
}

There’s a Demo for that

Check out the ASPxCalendar’s Multi-Month View online demo to see a live version of this feature. You can also see the code used in the demo by clicking on the ‘Code’ tab.

Check out the ASPxCalendar’s Multi-Month View online demo and then drop me a line below with your thoughts.

Follow MehulHarry on Twitter

DXperience? What's That?

DXperience is the .NET developer's secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Downloads/NET/

1 comment(s)
Ian Pook

Hi Mehul.

We'd forgotten about this feature which is we have now implemented, so thanks for the post!

One question, the multi-view (or single view for that matter) always starts with the current month...is there any way in code to get multi-view to display previous months automatically e.g. for posting historical information you might want to see the last three months in a 1 x 3 without having to use the fastnav to page the months backwards.

Cheers.

Pookie.

17 December, 2010

Please login or register to post comments.