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

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.

1 Answer 55 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jose
Top achievements
Rank 2
Jose asked on 15 Jan 2011, 12:22 AM
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..

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 19 Jan 2011, 12:51 PM
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.
Tags
Calendar
Asked by
Jose
Top achievements
Rank 2
Answers by
Marin
Telerik team
Share this question
or