Is It possible to set ClientEvents-OnError for RadDate Picker From directly Web.config

2 posts, 0 answers
  1. Abhishek Chowdhury
    Abhishek Chowdhury avatar
    2 posts
    Member since:
    Mar 2010

    Posted 17 Jun 2010 Link to this post

    In my project there are lots of Data Pickers are present not only in entire project but also on individual pages.
    I am using Telerik 2010 Q1 .
    So the problem i am facing is that on pasting the characters or typing characters in the Date Picker it is not validating at all and my page gets submitted on submit click.
    but if i use some thing like this in one JS file i.e.(Common.JS)


    function Error(sender, args) {




    and then in individual page i write 




    telerik:RadDatePicker ID="dtFollowUpDate" runat="server" Skin="Office2007" Culture="English (United States)"








    <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>




    <DateInput ID="DateInput1" Skin="Office2007" runat="server" DateFormat="dd-MMM-yyyy" DisplayDateFormat="dd-MMM-yyyy"




    ClientEvents-OnError="Error" Height="18px">








    <Calendar ID="Calendar2" runat="server" Skin="Office2007">









     and its work perfectly for me.But for this to happen i have to write in all the pages for each control.

    So what i want is to write some common thing in Web.config so that all the page should take effect.
    Some thing like this




    add key="Telerik.Web.UI.RadDateInput.ClientEvents-OnError" value="Error" />




    Please advice how these can be achived or there is any other way to do this globally.
    Thanks in Advance.

  2. Dimo
    Dimo avatar
    8486 posts

    Posted 21 Jun 2010 Link to this post

    Hello Abhishek,

    You can't use the web.config in your case, but you can inherit the RadDatePicker control and add the OnError handler programmatically in the inherited control's constructor.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top