Validation in RadScheduler is working but error message is missing

10 posts, 1 answers
  1. Keiichi-kun
    Keiichi-kun avatar
    14 posts
    Member since:
    Dec 2010

    Posted 18 Mar 2013 Link to this post

    Hi all,
    in my radscheduler instance I've a validator on subject field

    This is the code

    protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)
        {
     if ((e.Container.Mode == SchedulerFormMode.AdvancedEdit) || (e.Container.Mode == SchedulerFormMode.AdvancedInsert))
                {
                    CustomValidator validatorForFilm1 = new CustomValidator();
                    RadScheduler scheduler = (RadScheduler)sender;               
                    validatorForFilm1.ValidationGroup = scheduler.ValidationGroup;
                    validatorForFilm1.ControlToValidate = "Subject";
                    validatorForFilm1.ErrorMessage = "Error";
                    validatorForFilm1.ClientValidationFunction = "validationFunctionSubject";
                    (e.Container.FindControl("Subject") as RadTextBox).Parent.Controls.Add(validatorForFilm1);
                    //e.Container.Controls.Add(validatorForFilm1);
                }
    }


    and the javascript part

    function validationFunctionSubject(source, arguments) {
                if (arguments.Value.length > 0)
                {
                    arguments.IsValid = true;
                }
                else
                {
                    arguments.IsValid = false;               
                }
            }


    The validator is working because when i click on "Save" button the appointment is not saved, but no error message is showing.
    I've hide some component of the advanced form in this way

    function OnClientFormCreated(sender, eventArgs) {
                    $telerik.$(".rsRecurrenceOptionList").children().each(function (i) {
                    if (i < 1 || i >= 2)
                    $(this).hide();
                    });
              
                    $telerik.$(".rsRecurrenceOptionList li:eq(1) input").attr("checked", "checked");
                    $telerik.$(".rsRecurrenceOptionList li:eq(1) input").click();         
                   
                    $telerik.$(".rsAdvRecurrenceRangePanel li:eq(0)").hide();
                    $telerik.$(".rsAdvRecurrenceRangePanel li:eq(1) span input").attr("checked", "checked");
     
                    $telerik.$(".rsAdvDaily li:eq(1)").hide();
                    $telerik.$(".rsAdvRecurrenceRangePanel li:eq(1)").hide();
     
                    $telerik.$(".rsAdvRecurrenceRangePanel li:eq(2) input").attr("checked", "checked");
                    //$telerik.$(".rsAdvRecurrenceRangePanel li:eq(2) input").click();
     
                    $telerik.$(".rsAdvOptionsPanel li:eq(1)").hide();
                    $telerik.$(".rsAdvOptionsPanel li:eq(2)").hide();           
            }

    and

    .rsAdvRecurrencePatterns
    {
       visibility : hidden !important;
       height: 0px;
    }

    Could it be the cause? I've tried to remove all this code and nothing changed..
    Any help on this?
    Thanks a lot

    N.
  2. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 21 Mar 2013 Link to this post

    Hello,

    Could you please clarify whether you are using the modal form of the RadScheduler advanced form? Additionally I would recommend using our code library resource for customizing the RadScheduler advanced form. The advanced form is a completely separate user control and you have the ability to modify the current advanced form required validators or add a completely new custom validator.


    Kind regards,
    Boyan Dimitrov
    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. Keiichi-kun
    Keiichi-kun avatar
    14 posts
    Member since:
    Dec 2010

    Posted 03 Apr 2013 Link to this post

    Hello,
    thanks for your reply.
    I'm using the modal advanced form
    <telerik:RadScheduler ID="RadScheduler1" runat="server" Culture="it-IT"
                Height="568px" onformcreated="RadScheduler1_FormCreated"                                     
                SelectedView="MonthView" Skin="Sitefinity" OnClientFormCreated="OnClientFormCreated"           
                onappointmentdatabound="RadScheduler1_AppointmentDataBound1"
                ontimeslotcreated="RadScheduler1_TimeSlotCreated1"
                 AdvancedForm-Modal="true" FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" >
    <AdvancedForm Modal="True"></AdvancedForm>

    Regards
    N.
  5. Answer
    Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 05 Apr 2013 Link to this post

    Hello,

    I would like to clarify that there is built-in validator for our subject field, but with our latest official release it seems that there is a problem with the indication when user tries to save the appointment with empty subject field.
     
    I have already logged that issue as a bug in our system for future fixing.

    I would like to apologize for any inconveniences caused.

    Kind regards,
    Boyan Dimitrov
    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.
  6. Derek
    Derek avatar
    6 posts
    Member since:
    Jul 2012

    Posted 11 Dec 2013 Link to this post

    Was this ever fixed? I'm having the same problem and I can't find a bug report on it.
  7. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 16 Dec 2013 Link to this post

    Hello,

    It seems that this issue is already resolved in our latest version Q3 2013 SP1 (2013.3.1114). Could you please specify exact which version you are using in your project? We would need that information in order to test this exact RadControls version.


    Regards,
    Boyan Dimitrov
    Telerik
    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 the blog feed now.
  8. Derek
    Derek avatar
    6 posts
    Member since:
    Jul 2012

    Posted 16 Dec 2013 Link to this post

    We are using Q2 2013 SP1 2013.2.717.40

    I worked around the issue by replacing the requiredfieldvalidators with customvalidators, but it would be nice to know if this is a known bug or not.
  9. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 19 Dec 2013 Link to this post

    Hello,

    I would like to clarify that there was a known issue with the subject validator - it did not indicate that user has not typed text in the subject field when inserting an appointment using the advanced form. As I mentioned in my last response this issue is already fixed with our latest release.


    Regards,
    Boyan Dimitrov
    Telerik
    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 the blog feed now.
  10. Shola Lawal
    Shola  Lawal avatar
    1 posts
    Member since:
    May 2009

    Posted 24 Mar 2015 Link to this post

    I currently have the latest version, which is Q1 2015 and I am still having the issue in which the form will not be saved if the "subject" field is not filled out, but there is no indication that the subject field is required.
  11. Ivan Danchev
    Admin
    Ivan Danchev avatar
    837 posts

    Posted 27 Mar 2015 Link to this post

    Hello,

    We can confirm that the absence of indication, when the subject field is left empty and you try to save the form, is a bug that can be reproduced with the RadScheduler's server-side binding. We are sorry for any inconvenience this issue might have caused you and we will try our best to fix it in one of our future releases.

    You can track the bug's progress on our Feedback Portal and vote for it if you like.

    As a token of gratitude for reporting this issue I updated your Telerik points(400).

    Regards,
    Ivan Danchev
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017