This is a migrated thread and some comments may be shown as answers.

Focused Date Column

1 Answer 55 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 29 Jul 2008, 04:35 AM
I need to create a multiview calendar w/ 3 columns.  However, this is for an application that looks backwards in time.  I'm trying to get the current month to show in the 3rd column (right side).  I've tried setting the focused date to today, then setting the FocusedDateColumn property to 2 then to 3 as I wasn't sure if the property was zero-based.  Neither works.

I've tried setting the property at design time which causes a designer error and the control won't render.  I've also tried to set it at runtime which throws the "Index was outside the bounds of the array" error.

Is there a sample that I've overlooked on how to correctly use this property, or am I mistaken on the purpose of the FocusedDateColumn property?

Thanks in advance,

Matt

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 31 Jul 2008, 01:10 PM
Hi Matt,


The FocusedDateColumn and FocusedDateRow properties are obsolete and will be removed from RadCalendar for the next version of the product. Please check whether your RadCalendar declaration does not contain these properties and if yes remove them. You can use SelectedDate instead of FocusedDateColumn. Here is an example:

<%@ Page Language="C#" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title>Untitled Page</title> 
    <script runat="server"
    protected void Page_Load(object sender, EventArgs e) 
    { 
        if (IsPostBack) 
            RadCalendar1RadCalendar1.FocusedDate = RadCalendar1.SelectedDate.AddMonths(-2); 
    }     
    </script> 
</head> 
<body> 
    <form id="form1" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <div> 
             
            <telerik:RadCalendar  
                MultiViewColumns="3"  
                EnableMultiSelect="false"  
                AutoPostBack="true"  
                ID="RadCalendar1"  
                runat="server" > 
            </telerik:RadCalendar> 
        </div> 
    </form> 
</body> 
</html> 
 



Greetings,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Matt
Top achievements
Rank 1
Answers by
Missing User
Share this question
or