DatePickerClientEvents does not have a public property named 'OnLoad'

3 posts, 0 answers
  1. Kennon McCaa
    Kennon McCaa avatar
    8 posts
    Member since:
    Jun 2009

    Posted 25 Oct 2014 Link to this post

    Can anyone explain why I get the following error?

    System.Web.HttpParseException (0x80004005): Type 'Telerik.Web.UI.Calendar.DatePickerClientEvents' does not have a public property named 'OnLoad'. ---> System.Web.HttpException (0x80004005): Type 'Telerik.Web.UI.Calendar.DatePickerClientEvents' does not have a public property named 'OnLoad'.

    The Telerik documentation on this page http://www.telerik.com/help/aspnet-ajax/input-client-side-onload.html states the following:
      The OnLoad event is supported by all RadInput controls.

    Here's my markup:
    <telerik:RadDateTimePicker
          ID="m_dpTargetDate"
          runat="server">
             <ClientEvents OnLoad="m_dpEventBegin_Load" />
    </telerik:RadDateTimePicker>

    <script type="text/javascript">
    var m_dpEventBegin = null;
    function m_dpEventBegin_Load(sender, args) {
          m_dpEventBegin = sender;
    }
    </script>

    I can get other client-side events to fire.

    Any help would be greatly appreciated.
  2. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 28 Oct 2014 Link to this post

    Hello Kennon,

    The RadDatePicker is not inherited from RadInputControl. The Picker essentially use RadDateInput and popup with RadCalendar.

    You can access the DateInput of the picker and use its Load event:
    <telerik:RadDatePicker runat="server">
        <DateInput>
            <ClientEvents OnLoad="youFunction" />
        </DateInput>
    </telerik:RadDatePicker>

    Note that Intelisense of Visual Studio can underline the usage of the "DateInput" as warning, but this is a bug in the VS. The code above will compile and work correctly


    Regards,
    Vasil
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kennon McCaa
    Kennon McCaa avatar
    8 posts
    Member since:
    Jun 2009

    Posted 30 Oct 2014 in reply to Vasil Link to this post

    Thank you Vasil. That worked perfectly.
Back to Top