change date time in advanced insert template based on custom resource selection

3 posts, 1 answers
  1. Jeffrey Sanford
    Jeffrey Sanford avatar
    5 posts
    Member since:
    Jul 2009

    Posted 11 Nov 2011 Link to this post

    Hello all,

    Is it possible to change the date and time components in the advanced insert template based on another resource (drop down list) value?  Here is the scenario:  a clinic has a predetermined date - we need the users to be able to select the clinic from a dropdownlist in the insert template (which is working) and update the dates and times based on the clinic date (which is not working), regardless of which date they gain access to the insert template.

    Any help is appreciated.

    JS
  2. Answer
    Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 16 Nov 2011 Link to this post

    Hi Jeffrey,

    Thank you for contacting the Telerik team.

    To achieve the described scenario, you could subscribe to the OnSelectedIndexChanged event of the Clinic combo (custom resource), where the start/end date could be changed.

    I have prepared a sample web page, which contains a simple workaround for this scenario. You could download the attached files, and test it locally.

    The sample page contains a RadScheduler which has an OnClientFormCreated event subscribed to it. In this event the Start Date/Time and End Date/Time objects are found and saved in global variables. Also, an  OnClientSelectedIndexChanged event is subscribed to the Clinic combo, and values are set to the start/end date/time objects (saved in the global variables), in accordance with the Combo's selected item's text. (Take a look at the attached sample, to see how it is implemented.)

    I hope you will find this useful for your scenario.

    Please feel free to contact us if you have further questions.

    Kind regards,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jeffrey Sanford
    Jeffrey Sanford avatar
    5 posts
    Member since:
    Jul 2009

    Posted 16 Nov 2011 Link to this post

    Ivana,

    Brilliant!.  The example was exactly what I was hoping to achieve.  Thank you for your assistance.

    Best,

    JS
Back to Top