AllowMultipleView with dock to fill?

2 posts, 0 answers
  1. David A.
    David A. avatar
    126 posts
    Member since:
    Aug 2008

    Posted 10 Feb 2012 Link to this post


    We are trying to replace a previous third party calendar control with your RadCalendar.  We have a calendar that is on a form that can be resized.  If the form is maximized, we expect the # of months (rows)  to increase.  The MultiViewRows looks like a fixed value, so we really don't know how many rows to display based on the resolution of the user.

    Is there a way to make this function like Outlook where changing the window size automatically adjusts the number of months to display?

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 15 Feb 2012 Link to this post

    Hello David,

    Thank you for your question.

    You can achieve similar behavior by handling the SizeChanged event of the RadCalendar:
    int rowHeight = 100;
    int colWidth = 100;
    public Form1()
        this.radCalendar1.AllowMultipleView = true;
        this.radCalendar1.SizeChanged += new EventHandler(radCalendar1_SizeChanged);
    void radCalendar1_SizeChanged(object sender, EventArgs e)
        int columns = Math.Max(this.radCalendar1.Width / colWidth, 1);
        int rows = Math.Max(this.radCalendar1.Height / rowHeight, 1);
        this.radCalendar1.MultiViewRows = rows;
        this.radCalendar1.MultiViewColumns = columns;

    I hope this will work for you. Feel free to ask if you have any additional questions.

    Kind regards,
    Ivan Todorov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top