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

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

1 Answer 81 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Abhishek Chowdhury
Top achievements
Rank 1
Abhishek Chowdhury asked on 17 Jun 2010, 07:10 AM
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) {

 

sender.clear();

}

and then in individual page i write 

 

<

 

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

 

 

 

Height="18px">

 

 

 

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

 

 

 

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

 

 

 

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

 

 

 

</DateInput>

 

 

 

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

 

 

 

</Calendar>

 

 

 

</telerik:RadDatePicker>

 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.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 21 Jun 2010, 10:12 AM
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.

Regards,
Dimo
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
Tags
Calendar
Asked by
Abhishek Chowdhury
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or