Using InputManager In MVC

5 posts, 1 answers
  1. Wesley
    Wesley avatar
    4 posts
    Member since:
    Mar 2009

    Posted 19 Sep 2009 Link to this post

    Is there any workaround that will allow me to use the RadInputManager on an MVC application?

    Specifically in a block of code like:

        <% using (Ajax.BeginForm("Search", "Events")) 
           { %> 
        <span id="EventSearchDiv"
            <%= Html.TextBox("EventSearch")%> 
            <input type="submit" value="Search" /> 
        </span> 
        <telerik:RadInputManager ID="RadInputManager1" runat="server"
            <telerik:TextBoxSetting BehaviorID="EventSearchBehavior" 
                EmptyMessage="Enter Event ID" 
                Validation-IsRequired="true" 
                ErrorMessage="Enter search text"
                <TargetControls> 
                    <telerik:TargetInput ControlID="EventSearchDiv" /> 
                </TargetControls> 
            </telerik:TextBoxSetting> 
        </telerik:RadInputManager> 
        <% } %> 

    I get 

    Control ... RadInputManager1_EventSearchBehavior' of type 'InputSettingCustomValidator' must be placed inside a form tag with runat=server.



  2. Wesley
    Wesley avatar
    4 posts
    Member since:
    Mar 2009

    Posted 20 Sep 2009 Link to this post

    I just saw it in the "limitations" section in the help :(   This won't effect my purchase decision because I've already but a lot of the other tools to use.  But, are there any hacks or workarounds to use the InputManager?  Experimenting with it in a non-MVC app, I can see that its an awesome validation and "watermarking" tool.

    This may be the wrong place to ask, but, if there are no workarounds yet, does anybody know any other tools or libraries that will do the same thing in effect so I can save a bit of javascripting?
  3. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 23 Sep 2009 Link to this post

    Hello Wesley,

    Thank you for contacting us and for your interests to our controls.

    Please review the attached test project. It shows how to use Script controls in ASP.NET MVC. Because the Ajax does not support scripts and css, if you need to use it you should eval JS code by your own.

    Greetings,
    Georgi Krustev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  4. Wesley
    Wesley avatar
    4 posts
    Member since:
    Mar 2009

    Posted 23 Sep 2009 Link to this post

    Thanks Georgi,

    Thanks for your reply and your great controls.  I've ran across that demo before on another post and its definitely helped out with how to implement your grid and I'll be using that strategy elsewhere in my app!

    Is there a similar demo or code snippet of how to do the same type of thing to take advantage of the validation features of the InputManager in MVC?

    Thanks,

    Wes

    Best Regards,

    Wes
  5. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3748 posts

    Posted 29 Sep 2009 Link to this post

    Hi Wesley,

    The InputManager cannot be used in a MVC way, because it manages server-side controls. Please consider using our other controls which can validates on the client-side.

    Sincerely yours,
    Georgi Krustev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top