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

find control inside AppointmentTemplate in javascript OnClientAppointmentClick event

2 Answers 63 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mangesh
Top achievements
Rank 1
Mangesh asked on 07 Sep 2012, 03:11 PM
Hi, I want to find control i.e. place inside AppointmentTemplate OnClientAppointmentClick event in Javascript. I've searched for many forums but didn't find anything related to javascript findcontrol.

Thanks in Advance,
Mangesh

2 Answers, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 10 Sep 2012, 10:00 AM
Hello Mangesh,

I believe the approach below will be helpful in your case:

// JavaScript
function OnClientAppointmentClick(sender, eventArgs)
  {
    var customControlID = $find("<%= CustomControlID.ClientID %>");
  }

//aspx file

<telerik:RadScheduler  ID="CustomControlID"  runat="server"   
OnClientAppointmentClick="OnClientAppointmentClick" 
 />

You can use it to access different controls on your page and their properties and functions.

Regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Mangesh
Top achievements
Rank 1
answered on 10 Sep 2012, 10:16 AM
Hi Boyan,

I want to find control inside AppointmentTemplate of Radscheduler i.e.

<telerik:RadScheduler  ID="CustomControlID"  runat="server"   
OnClientAppointmentClick="OnClientAppointmentClick" >
 <AppointmentTemplate>
                            <div class="AppointmentColorizedHolder">
                                <asp:Panel ID="pnlAppointmentColorizedHolder" CssClass="AppointmentColorized" runat="server">
                                    <%# Eval("Subject") %>
                                    <asp:HiddenField id="hdfPatientID" runat="Server">
                                </asp:Panel>
                            </div>
                        </AppointmentTemplate>
</telerik:RadScheduler>

In this case, I want to find hdfPatientID on OnClientAppointmentClick event.

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