Prevent change in AutoComplete field based on other page data

2 posts, 1 answers
  1. Richard
    Richard avatar
    38 posts
    Member since:
    Mar 2011

    Posted 05 Mar 2014 Link to this post

    I have an AutoComplete that is context dependent on other fields of the View screen.  For example, if a work order number is null, the autocomplete should function normally, however, if the workorder is present, then the autocomplete should not accept any changes because the value is then dictated by the work order and would only change if the work order changed.  I don't want to make the field read-only because then it won't post it's data to the server.  That would make things complicated and I adore simple.

    I don't find an onBeforeChange event for the widget... is it possible to hook one up, and if so how?  If not, please suggest a solution.

    Thanks!
  2. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 06 Mar 2014 Link to this post

    Hello Richard,

    An input element with readonly attribute will be posted to the server (it will be successful). Based on this I would suggest you make the widget readonly when you do not want to allow any modifications. Use the readonly method for that task

    Regards,
    Georgi Krustev
    Telerik

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

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