"Required" message exists even after the value is entered in the Email body.

5 posts, 0 answers
  1. Kannan
    Kannan avatar
    14 posts
    Member since:
    Jul 2013

    Posted 13 Aug 2013 Link to this post

    Hi ,

    I'm using telerik rad editor with required field Validator ..

    When click submit button it shows Required that is right after entering value in emailbody after i click button only the required is invisible but normal textbox i click outside of the textbox it self required is invisible . 


    While click button event only the Required message will visible and invisible  this is happened only Rad editor but other controls while click outside also the required is visible and invisible

    Refer your link

    http://demos.telerik.com/aspnet-ajax/editor/examples/validators/defaultcs.aspx#qsf-demo-source


         <telerik:RadEditor ID="CorrespondenceAlertEditor" runat="server" OnClientLoad="OnClientLoad"
                            ContentFilters="None" EnableResize="false" Skin="Gray" ToolsFile="~/Contracting/ToolsFile.xml"
                            Width="99%">
                            <CssFiles>
                                <telerik:EditorCssFile Value="~/EditorContent.css" />
                            </CssFiles>
                            <Content>                  
                
                            </Content>
                        </telerik:RadEditor>

        <asp:CustomValidator ID="ctmValrfvEmailBody" runat="server" Text="◄ Required" ValidationGroup="ClientValidation"
                            Display="Dynamic" ClientValidationFunction="ValidateEditText"></asp:CustomValidator>    


    Thanks,
    Kannan.


  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 15 Aug 2013 Link to this post

    Hi Kannan,

    The custom validator control is designed for validating with a custom client-side logic. For example, in the mentioned demo the function checkLength() performs the check whether the length of the content is less than 50 characters. You can examine this MSDN article about the CustomValidator control for more information.

    If the case is that you need the editor to be only a required field you could use the RequiredFieldValidator control instead of the above mentioned control. The following code sample shows this approach:
    <telerik:RadEditor ID="CorrespondenceAlertEditor" runat="server" _OnClientLoad="OnClientLoad"
        ContentFilters="None" EnableResize="false"
        Width="99%">
    </telerik:RadEditor>
     
    <asp:RequiredFieldValidator ID="CorrespondenceValidator" runat="server" Text="◄ Required"
        ControlToValidate="CorrespondenceAlertEditor" Display="Dynamic"></asp:RequiredFieldValidator>

    Which is the version of RadControls for ASP.NET AJAX that you are currently using?

    If you are still having difficulties, please send step by step instructions for reproducing the problem in the linked demo so that I can inspect it locally. You can use a video for this purpose.

    Regards,
    Ianko
    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.
  3. Kannan
    Kannan avatar
    14 posts
    Member since:
    Jul 2013

    Posted 16 Aug 2013 Link to this post

    Hi Ianko ,

    Thanks for your reply. I knew that we have to use Required field validator My problem is


    After clicking submit button only it shows Required .
    but other controls when click any of page it self it showing required . hope you clear about my problem .

    I'm using Telerik.Web.UI namespace hope it is 2008 version .


    Check your example in Telerik website
    http://demos.telerik.com/aspnet-ajax/editor/examples/validators/defaultcs.aspx#qsf-demo-source

    there we click any where its Required  after typing data it gone thats good but Rad editor not behave like that ( I think on change event )

    Thanks,
    Kannan.
  4. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 20 Aug 2013 Link to this post

    Hi Kannan,

    The described functionality is not a part of the RadEditor control's implementation, because the editor is a textbox in an iframe and could not modify the show/hide functionality of the validator control. The RadTextBox control exists in the same document where the validator is, this is why the event handler responsible for listening the content can modify the validator's visibility.

    Nevertheless, you could implement a custom Client-side functionality attached to the OnClientSelectionChange event of the editor, in which the logic will check if it is typed in the content and show or hide the validator's message. 

    Regards,
    Ianko
    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.
  5. Tony
    Tony avatar
    1 posts
    Member since:
    Jul 2014

    Posted 31 Jul 2014 Link to this post

    I was having the same problem. Thanks for the solution.   



    -------------------------------------------
    http://jelqingresults.net
Back to Top