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

getting ClientID from radTimePicker

1 Answer 49 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 23 Sep 2008, 07:56 AM
Hi,

I am programatically generating about 50 timepickers on a web page via user controls.

I am also using a shared javascript function to handle the client side OnDateSelected event.

This all works fine but I now need to get the ClientID from the sender object that's passed in the OnDateSelected to find out which one was used.

I am using the sender.ClientID property but it comes up undefined...how else do I do this?

The Version of  dll I am using is 2008.2.723.20.

Regards
Roger

1 Answer, 1 is accepted

Sort by
-1
Roger
Top achievements
Rank 1
answered on 24 Sep 2008, 04:18 AM
Hi,
found the problem..it's to do with the referencing of the control within the user control, etc, etc.

Have got it going now

Regards
Roger
Grant
Top achievements
Rank 1
commented on 18 Jul 2022, 11:41 PM

Would love to know the solution you found.

 <telerik:RadDatePicker ID="txtDateFrom" runat="server" required type="DateTime">
                </telerik:RadDatePicker>

chrome sees : 

 

<div id="ctl00_cp_txtDateFrom_wrapper" class="RadPicker RadPicker_Default" required="

and jQuery doesn't see it with

$('#<%=txtDateFrom.ClientID %> ').click(function () {

// never get here using txtDateFrom
                alert('click 1');


            });

 

So what is referencing of the control within the user control do?

Doncho
Telerik team
commented on 21 Jul 2022, 12:24 PM

Hi Grant,

You can get a reference to the client-side control object of the RadDatePicker in one of the approaches described here - Getting Client-Side References to Control Objects. Once you reach the control on the client-side you can use its API to perform actions with it - RadDatePicker object.

Please share what is the desired behavior you need to achieve so we can assist you more accurately.

 

 

Tags
Calendar
Asked by
Roger
Top achievements
Rank 1
Answers by
Roger
Top achievements
Rank 1
Share this question
or