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

Rad Scheduler Month view issue

1 Answer 58 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mk
Top achievements
Rank 1
Mk asked on 01 Mar 2014, 01:33 PM
Hi

I am using Rad Scheduler Month view and i am getting two problem.First problem is when i click on any date it should be highlight and second when i click on cell ,value of selected cell to be show on aspx page label or any control.

Please help me on this issue .I am using asp.net and c#.

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 05 Mar 2014, 04:23 PM
Hello,

An easy and convenient way would be to use RadScheduler OnNavigationCommand and cancel it if the user has clicked on the date link. The latter could be achieved by using jQuery mousedown event for that date DOM element and store some value in hidden field that will be used on the server.
//markup code
<telerik:RadScheduler runat="server" ID="RadScheduler1" ....
OnNavigationCommand="RadScheduler1_NavigationCommand" OnClientTimeSlotClick="clientTimeSlotClick">
...
</telerik:RadScheduler>
<asp:HiddenField ID="hiddenField1" runat="server" />

//JavaScript
function pageLoad() {
            $telerik.$(".rsDateHeader").mousedown(function () {
                $telerik.$("#hiddenField1").val("Cancel");         
            });
        }
//code behind
protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
        {
            if (e.Command == SchedulerNavigationCommand.SwitchToSelectedDay && hiddenField1.Value == "Cancel")
            {
                e.Cancel = true;
                hiddenField1.Value = String.Empty;
            }
        }


As for your second question - you can use the RadScheduler OnClientTimeSlotClick and set the label text as shown in the code snippet below:
//JavaScript
function clientTimeSlotClick(sender, args) {
             
            $telerik.$("#Label1").text(args.get_targetSlot().get_startTime().getDate());
        }

In this case we assume that you have a asp:Label control on the page with ID="Label1".


Regards,
Boyan Dimitrov
Telerik

DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

Tags
Scheduler
Asked by
Mk
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or