trying to show radcombobox in a radcalendar cell gives error: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.

2 posts, 0 answers
  1. Jose
    Jose avatar
    9 posts
    Member since:
    Apr 2008

    Posted 14 Jan 2011 Link to this post

    I am trying to add a radcombobox to every cell in the calender. but I get this error when I run the project:  
    If I add a label as shown in one of your example it works fine but doesnt work with a radcombobox.
    Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
     Protected Sub RadCalendar1_DayRender(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs)
                Dim ddl As New RadComboBox
                ddl.Items.Add(New RadComboBoxItem("", ""))
                ddl.Items.Add(New RadComboBoxItem("H", "H"))
                ddl.Items.Add(New RadComboBoxItem("V", "V"))
                ddl.Items.Add(New RadComboBoxItem("I", "I"))
                ddl.Items.Add(New RadComboBoxItem("T", "T"))
                e.Cell.Controls.Add(ddl)
        End Sub


    Heres the calendar source
     <telerik:RadCalendar ID="RadCalendar1" Runat="server" MultiViewColumns="3"
                       SelectedDate="" ViewSelectorText="x" ondayrender="RadCalendar1_DayRender"
                       CssClass="RadCalendarMultiView RadCalendarMultiView_Default">
                       <dayoverstyle cssclass="rcHover" />
                       <fastnavigationstyle cssclass="RadCalendarMonthView RadCalendarMonthView_Default" />
                       <disableddaystyle cssclass="rcDisabled" />
                       <WeekendDayStyle CssClass="rcWeekend" />
                       <viewselectorstyle cssclass="rcViewSel" />
                       <SelectedDayStyle CssClass="rcSelected" />
                       <calendartablestyle cssclass="rcMainTable" />
                       <OtherMonthDayStyle CssClass="rcOtherMonth" />
                       <outofrangedaystyle cssclass="rcOutOfRange" />      
                   </telerik:RadCalendar>


    Please advice how can I show a rad combo box in there..
  2. Marin
    Admin
    Marin avatar
    1057 posts

    Posted 19 Jan 2011 Link to this post

    Hi Ropate,

    I am afraid this scenario is not supported. RadComboBox is a complex control and cannot be nested inside a simple calendar cell due to design limitations. You can try adding a standard DropDownList instead. 

    Greetings,
    Marin
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top