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

Server side OnTimeSlotClick event?

7 Answers 123 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Domamu
Top achievements
Rank 1
Domamu asked on 10 Feb 2009, 03:48 AM
Hi,
  I noticed there is a client side event called OnClientTimeSlotClick and there are few posts about how to get the time when somebody click on an empty slot on the schedule.  But I really don't want to use client side event.

  Is there a similar event for server side?  I assume it's called OnTimeSlotClick, but I couldn't find it.

Thanks,
Dom

7 Answers, 1 is accepted

Sort by
0
Adam Cole
Top achievements
Rank 1
answered on 10 Feb 2009, 03:47 PM
Hi Dom,
  Have you found out how to get the time when user click on an empty time slot?
0
Domamu
Top achievements
Rank 1
answered on 11 Feb 2009, 03:21 PM
Bump bump..
Can anyone answer my question?
I think it's a very simple question.  If not, I can open a ticket.
0
Peter
Telerik team
answered on 11 Feb 2009, 05:09 PM
Hello guys,

I can confirm that RadScheduler does not expose a TimeSlotClick server event. The OnClientTimeSlotClick though should be sufficient. You can use it in combination with RadAjaxManager and handle the AjaxRequest server event to pass data from the clicked timeslot to the server. The context menu integration example uses a similar concept. I can give you a code sample if you specify what exactly you need to achieve.  


All the best,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Domamu
Top achievements
Rank 1
answered on 11 Feb 2009, 06:32 PM
Hi Peter,
    Thank you for the response.  Actually, I have the code to combine RadAjaxManager and AjaxRequest server event and it works.  I was just curious if there is a easier way to do it.

Thanks,
Dom

0
Peter
Telerik team
answered on 13 Feb 2009, 12:42 PM
Hi Dom,

Your inquiry is quite understandable in light of the lines of code required for the workaround, but there isn't really a simpler way to achieve this.



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.
0
Luke
Top achievements
Rank 1
answered on 23 Feb 2011, 08:28 PM
Hi Peter,

I have a similar problem as I'm trying to check the appointment availability when a user clicks a timeslot (before they fill out everything in my custom form to realize they have to start over).  I was wondering if you could post the sample code you were talking about that shows how to pass variables to a server side event using the onclienttimeslotclick client side event.

Thanks,

Luke
0
Peter
Telerik team
answered on 24 Feb 2011, 12:25 PM
Hi Luke,

Here is a code sample using the approach from this help topic:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
      <script type="text/javascript">
          function OnClientTimeSlotClick(sender, args) {
              $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(args.get_targetSlot().get_startTime().format("yyyy/MM/dd hh:mm"));
          }
      </script>
  </telerik:RadCodeBlock>
  <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
  </telerik:RadScriptManager>
  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
      <AjaxSettings>
          <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
              <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
              </UpdatedControls>
          </telerik:AjaxSetting>
      </AjaxSettings>
  </telerik:RadAjaxManager>
  <telerik:RadScheduler runat="server" ID="RadScheduler1" OnClientTimeSlotClick="OnClientTimeSlotClick">
  </telerik:RadScheduler>


protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
   {
       RadScheduler1.ShowInlineInsertForm(DateTime.Parse(e.Argument));
   }


All the best,
Peter
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Scheduler
Asked by
Domamu
Top achievements
Rank 1
Answers by
Adam Cole
Top achievements
Rank 1
Domamu
Top achievements
Rank 1
Peter
Telerik team
Luke
Top achievements
Rank 1
Share this question
or