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

Hide or remove Saturday and Sunday checkboxes of Weekly recurrence in RadSchedulerRecurrenceEditor

10 Answers 224 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Tiffany Phan
Top achievements
Rank 1
Tiffany Phan asked on 09 May 2011, 07:39 PM
I found the code to hide or remove Hourly recurrence and it was very helpful.
Now, I tried to hide or remove Saturday and Sunday checkboxes of Weekly recurrence in RadSchedulerRecurrenceEditor.
How do I do this?  Please help!  Thanks in advance!

10 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 10 May 2011, 09:53 AM
Hello Tiffany Phan,

You can use this jQuery code in the OnClientFormCreated to hide "Sunday" and "Saturday" options from the Weekly Recurrence:

function OnClientFormCreated(sender, eventArgs) {
         $telerik.$('.rsAdvWeekly_WeekDays li:first-child').hide();
         $telerik.$('.rsAdvWeekly_WeekDays li:last-child').hide();
     }

Please let me know if this was helpful.

Regards,
Veronica Milcheva
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.

0
Tiffany Phan
Top achievements
Rank 1
answered on 10 May 2011, 02:44 PM
Hi Veronica,

Thank you for your quick response.

Yes, it worked very well.  However, the order of checkboxes for days is a little bit odd.
From left to right in the first row, it showed Monday, Tuesday, Wednesday, Friday.
The second row is Thursday.  See my attachment.

Please advice and again thanks for your help!

Tiffany Phan
0
Veronica
Telerik team
answered on 10 May 2011, 03:24 PM
Hello Tiffany Phan,

This is very strange. I don't get the same result on my side as you can see below:



Have you set Width to the Advanced Form?

Kind regards,
Veronica Milcheva
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.

0
Tiffany Phan
Top achievements
Rank 1
answered on 10 May 2011, 04:47 PM

Hi Veronica,

Thanks for your suggestion.  I believed you.

I used External Edit in RadDock inside a MasterPage in my application. 
And I used RadControls for ASP.NET AJAX Q3 2010 .NET 3.5.

I also created a brand new page with and without "Selected Master Page" to test this, but the results are the same.
The Friday checkbox came first, then the Thursday checkbox was in the second row.

Anyway, just to let you know.  I'm appreciate for your help.

Tiffany Phan

0
Veronica
Telerik team
answered on 13 May 2011, 09:08 AM
Hello Tiffany Phan,

Could you please send me a sample project that reproduces the issue so I can inspect it and help you?

Thank you!

All the best,
Veronica Milcheva
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.

0
Tiffany Phan
Top achievements
Rank 1
answered on 13 May 2011, 03:56 PM

Hi Veronica,

I tried to attach the sample project but the attached files allowed extensions for pics only.
I got a zip file with me.

 

Anyway, I just attached the pics here so you can see what I did
Pic 1.  Recurrences of a RadScheduler (I used Radcontrols for ASP.NET AJAX Q3 2010 .NET 3.5)
Pic 2.  The picture of my "Default.aspx" Page using your javascript codes

Hope you can help me with these!

 

Again, thanks so much!

 

Tiffany Phan

0
Veronica
Telerik team
answered on 13 May 2011, 04:28 PM
Hello Tiffany Phan,

Thank you for the attached images. However it will be very hard for me to rewrite the page from a picture. Could you please open new support thread and attach the code there?

Thank you!

Regards,
Veronica Milcheva
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.

0
Tiffany Phan
Top achievements
Rank 1
answered on 13 May 2011, 04:38 PM
Here you are:

<%@ Page Language=
"VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
  
    <script type="text/javascript">
        //Put your JavaScript code here.
            function OnClientFormCreated(sender, eventArgs) 
            {
                $telerik.$(".rsAdvWeekly_WeekDays li:first-child").hide();
                $telerik.$(".rsAdvWeekly_WeekDays li:last-child").hide();                                                 
  
            }  
              
            function OnClientRecurrenceActionDialogShowing(sender, eventArgs) 
            {
                 eventArgs.set_cancel(true);
                    //Edit this instance only:
                    //eventArgs.set_editSeries(false);
                      
                    //Edit the entire series:
                 eventArgs.set_editSeries(true);
            }     
    </script>
  
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">        
    </telerik:RadAjaxManager>
     
    <div>
        <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Office2007" DataEndField="EndDate"
            DataKeyField="ID" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
            DataSourceID="ldsActivitySchedules" DataStartField="StartDate" DataSubjectField="Subject"
            OnClientFormCreated="OnClientFormCreated()" OnClientRecurrenceActionDialogShowing="OnClientRecurrenceActionDialogShowing"
            AllowDelete="False" 
            EnableCustomAttributeEditing="True" FirstDayOfWeek="Monday" 
            LastDayOfWeek="Friday" MinutesPerRow="15" ShowAllDayRow="False" Width="700px" Height="650px">
            <TimelineView UserSelectable="False" />
            <AdvancedForm EnableCustomAttributeEditing="True" Modal="True" />
            <ResourceTypes>
                <telerik:ResourceType DataSourceID="ldsActivities" ForeignKeyField="ActivityID" 
                    KeyField="ID" Name="Activities" TextField="Description" />
            </ResourceTypes>
        </telerik:RadScheduler>
        <asp:LinqDataSource ID="ldsActivities" runat="server" 
            ContextTypeName="DataClassesDataContext" EnableInsert="True" 
            EnableUpdate="True" OrderBy="Description" TableName="ACTIVITies">
        </asp:LinqDataSource>
        <asp:LinqDataSource ID="ldsActivitySchedules" runat="server" ContextTypeName="DataClassesDataContext"
            EnableInsert="True" EnableUpdate="True" OrderBy="StartDate" TableName="ACTIVITYSCHEDULEs">
        </asp:LinqDataSource>
    </div>
    </form>
</body>
</html>
0
Veronica
Telerik team
answered on 16 May 2011, 10:10 AM
Hi Tiffany,

I tried to reproduce the issue but to no avail.

Could you please open a new support thread and attach your full code there? Also I'll need some more information on that in which browser do you get the issue? Also in the Ticket Info I can see that you are using version 2011.1 413. Can you confirm this?

Kind regards,
Veronica Milcheva
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.

0
Veronica
Telerik team
answered on 19 May 2011, 07:33 AM
For those who follow up the thread:
 
"Thursday" comes on the row below only in IE7 because it has style="clear: left". You need to remove this style and the recurrence panel will look OK. Here's the code for this:
Copy Code
$telerik.$(".rsAdvWeekly_WeekDays li:nth-child(5)").css("clear","");

Regards,
Veronica Milcheva
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
Scheduler
Asked by
Tiffany Phan
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Tiffany Phan
Top achievements
Rank 1
Share this question
or