week number in header

6 posts, 0 answers
  1. PÄR-OSKAR HOLMGREN
    PÄR-OSKAR HOLMGREN avatar
    8 posts
    Member since:
    Jun 2007

    Posted 01 Oct 2008 Link to this post

    Hi

    A few moths ago I started a thread and later a support ticket regarding writing the week number in the date header of the radscheduler week and day view and your reply was that I could find the LiteralControl that held the header by referring to:

    RadScheduler1.Controls[0].Controls[0].Controls[2].Controls[0]

    and then use my custom method to retrieve the week number and write it to the LiteralControl

    that worked fine until I upgraded to the latest version of the package which renders an error that the same control now is a WebControl not a LiteralControl. Is there a new way for me to write to the header or anotherway to display the week number?

    with kind regards
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 02 Oct 2008 Link to this post

    Hello,

    Unfortunately, this is in the nature of these workarounds - they are very tightly integrated with implementation details. We will hopefully provide proper templates soon. Until then the workaround has to be updated to:

    RadScheduler1.Controls[0].Controls[0].Controls[3].Controls[0]

    Sorry for the inconvenience.

    Kind regards,
    Tsvetomir Tsonev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kasper Bergmann
    Kasper Bergmann avatar
    14 posts
    Member since:
    Feb 2007

    Posted 26 May 2009 Link to this post

    Hi

    Is the template for the header available now? I could not find anything about it in the documentation of RadScheduler.

    Best regards,

    Kasper Bergmann
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 26 May 2009 Link to this post

    Hi Kasper,

    Such a template has not been implemented yet.


    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Kasper Bergmann
    Kasper Bergmann avatar
    14 posts
    Member since:
    Feb 2007

    Posted 27 May 2009 Link to this post

    Hi Peter

    OK, then I would like to get an explanation of how to implement the workaround when the scheduler is located in a control as OnPreRenderComplete is not a function of System.Web.UI.UserControl.

    Thanks in advance,

    Kasper
  7. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 30 May 2009 Link to this post

    Hello Kasper,

    You find the scheduler control in the aspx page and still use OnPreRenderComplete. For example, suppose you have the following setup:

    WebUserControl.ascx
    <telerik:RadScheduler ID="RadScheduler1" runat="server" 
    DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="Subject">  
    </telerik:RadScheduler> 

    Default.aspx:
    <form id="form1" runat="server">  
         <asp:ScriptManager ID="ScriptManager1" runat="server">  
         </asp:ScriptManager>    
         <uc1:WebUserControl ID="WebUserControl1" runat="server" /> 
        </form> 

    Then you can do the following:

    Default.aspx.cs (code-behind):
     protected override void OnPreRenderComplete(EventArgs e)  
        {  
            base.OnPreRenderComplete(e);  
     
            UserControl schedulerUserControl = Page.FindControl("WebUserControl1"as UserControl;  
            RadScheduler scheduler = schedulerUserControl.FindControl("RadScheduler1"as RadScheduler;  
                    
        }   



    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017