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

[Solved] RadDatePicker clientside events

7 Answers 250 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
itesso
Top achievements
Rank 1
itesso asked on 07 Sep 2009, 10:26 AM
dear all,

i am using the raddatepicker in my webapplication. i have added a javascript to my application that is executed when ClientEvents-OnDateSelected is fired. this event doenst repond to keybord inputs. is there an option to make the control respond to keybord inputs client side?

greets,

danny

7 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 07 Sep 2009, 12:31 PM
Hello Danny,

You can use the keypress client event handler of the DatePicker's textbox, which is a RadDateInput control:

<telerik:RadDatePicker>
    <DateInput>
        <ClientEvents OnKeyPress="..........." />
    </DateInput>
</telerik:RadDatePicker>

http://www.telerik.com/help/aspnet-ajax/input_clientsideonkeypress.html

http://www.telerik.com/help/aspnet-ajax/input_clientsideraddateinput.html

Greetings,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
itesso
Top achievements
Rank 1
answered on 07 Sep 2009, 03:30 PM
Thanks for your reply.

i would have guessed that for the RadComboBox the implementation would be the same. is there a similar way to get a clientside event for the RadComboBox?

thx,

 

0
Dimo
Telerik team
answered on 07 Sep 2009, 03:51 PM
Hi Danny,

Please refer to

http://www.telerik.com/help/aspnet-ajax/combo_clientsideonclientkeypressing.html

Regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
itesso
Top achievements
Rank 1
answered on 08 Sep 2009, 02:22 PM
thanks for the reply,

however, i am looking for something more like keypressed, an event fired after the key has been pressed.

greets,

danny
0
Veselin Vasilev
Telerik team
answered on 09 Sep 2009, 07:38 AM
Hello danny ha,

Add this script to your page to accomplish that:

<script type="text/javascript"
    Sys.Application.add_load(function() { 
        var combo = $find('<%= RadComboBox1.ClientID %>'); 
        var input = combo.get_inputDomElement(); 
        input.onkeyup = onKeyUpFunction; 
    }); 
 
    function onKeyUpFunction(e) { 
        if (!e) e = window.event; 
        alert(e.keyCode); 
    } 
</script> 

I hope this helps.

All the best,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
itesso
Top achievements
Rank 1
answered on 10 Sep 2009, 10:49 AM
At first that seemed to work, however i found out that when using iis7 in combination with IE it gives sys is undefined. I dont get that error when testing the application on my local machine (xp/iis5) with IE and FF or when using FF when the application is deployed on the webserver (2008/iis7).

Is there a solution for this? I searched the forum allready for sys is undefined however the solutions given are nog working for me.

Greets,
0
Veselin Vasilev
Telerik team
answered on 11 Sep 2009, 12:15 PM
Hello dannyh,

Please follow the steps in this troubleshooting article.

Best wishes,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
itesso
Top achievements
Rank 1
Answers by
Dimo
Telerik team
itesso
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or