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

Multiple Rad Calendar cntrls in user cntrl on dynamically created PageView

1 Answer 51 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Jacques asked on 20 Aug 2008, 03:03 PM
I have a RadTimePicker control in a user control (ascx). When this is the only RadCalendar type control it works correctly. When a RadDatePicker is added to the user control, neither the TimePicker or DatePicker work (No popup).

The controls are within a dynamically created pageview.

We've attempted to use a shared calendar and Timeview control to no avail. We tried adding these controls to the ascx page and to the aspx page. Neither worked.

Would greatly appreciate any help in getting multiple controls to work is this scenario.



aspx segment of page which uses a master
<asp:Panel ID="pnlPreferences" runat="server" GroupingText="">  
    <table border="0">  
            <td align="center">  
                 <telerik:RadTabStrip OnClientTabSelecting="onTabSelecting" ID="rtsDonorView" SelectedIndex="0" 
                    runat="server" MultiPageID="rmpDonorView" AutoPostBack="true"   
                <telerik:RadMultiPage ID="rmpDonorView" runat="server" SelectedIndex="0" RenderSelectedPageOnly="true" > 

partial code behind for aspx page
   Protected Overrides Sub OnLoadNonPostBack()  
        'TODO Add error checking and recovery to handle case that no DonorInformationID is supplied.  
        If Request("DonorInformationID") Is Nothing Then  
            'Throw New Exception("DonorInformationID must be supplied")  
        End If  
        '** hidden fields are losing their values when a tab is clicked.              **  
        '** Storing as viewstate in properties retains the values between tab selections  
        'hfDonorInformationID.Value = Request("DonorInformationID")  
        DonorInformationID = 1 'TODO Testing. Hidden fields are losing their values when a tab is clicked. Testing viewstate  
        PersonID = ent.DonorInformation.Include("Person") _  
        AddTab("Donor Summary", "DonorSummary.ascx")  
        AddTab("Donation History", "DonationHistory.ascx")  
        AddTab("Contact History", "ContactHistories.ascx")  
        AddTab("Campaigns", "Campaigns.ascx")  
        rtsDonorView.FindTabByValue("Campaigns.ascx").IsBreak = True 
        AddTab("Contact Information", "ContactInformation.ascx")  
        AddTab("Preferences", "Preferences.ascx")  
        AddTab("Concerns", "Concerns.ascx")  
        AddTab("Household", "Household.ascx")  
        Dim sTemplate = (From q In ent.Template _  
                       Where q.TemplateType.TemplateTypeID = 4 _  
                       Select q.Value _  
        lblViewTemplate.Text = Utility.TemplateProcessing.ProcessTemplate(sTemplate, PersonID)  
    End Sub  
    Protected Sub rmpDonorView_PageViewCreated(ByVal sender As Object, _  
                                               ByVal e As RadMultiPageEventArgs) _  
                                               Handles rmpDonorView.PageViewCreated  
        Dim userControlName As String = e.PageView.ID  
        Dim userControl As DonorViewTab = Page.LoadControl("DonorViewControls/" & userControlName)  
        userControl.DonorInformationID = DonorInformationID  
        userControl.PersonID = PersonID  
        userControl.ID = e.PageView.ID & "_userControl"  
    End Sub  
    Protected Sub rtsDonorView_TabClick(ByVal sender As Object, _  
                                        ByVal e As RadTabStripEventArgs) _  
                                        Handles rtsDonorView.TabClick  
        If e.Tab.PageViewID.ToString = "" Then  
        End If  
        e.Tab.PageView.Selected = True 
    End Sub  
    Private Sub AddTab(ByVal tabName As String, ByVal tabID As String)  
        Dim tab As RadTab = New RadTab  
        tab.Text = tabName 
        tab.Value = tabID 
    End Sub  
    Private Sub AddPageView(ByVal tab As RadTab)  
        Dim pageView As RadPageView = New RadPageView  
        pageView.ID = tab.Value  
        tab.PageViewID = pageView.ID  
    End Sub  

partial code for ascx user control
        <td align="right"><asp:Label ID="lblTime" runat="server" meta:ResourceKey="lblTime" CssClass="Label" /></td>  
        <td colspan="2" align="left">  
            <telerik:RadTimePicker ID="rtpCallPreference" runat="server"   
                Culture="English (United States)" SharedTimeViewID="RadTimeView1">  
                <TimePopupButton CssClass="" /> 
                <TimeView Interval="01:00:00">  
                <DateInput LabelCssClass="" Width="">  
                <Calendar UseColumnHeadersAsSelectors="True" UseRowHeadersAsSelectors="True">  
                <DatePopupButton CssClass="" Visible="False" /> 
            <td align="right"><asp:Label ID="lblExpires" runat="server" meta:ResourceKey="lblExpires" CssClass="Label"></asp:Label> 
            <td align="left">  
             <telerik:RadDatePicker ID="rdpExpires" Runat="server">  

1 Answer, 1 is accepted

Sort by
Maria Ilieva
Telerik team
answered on 21 Aug 2008, 08:22 AM
Hello Jacques,

I created a small project following your scenario but was not able to replicate the described issue locally. Will it be convenient for you to open a regular support ticket and send us sample runnable project which replicates the problem. We will test it locally and provide accurate solution for the issue you are facing.

Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question