Disable autocomplete selection for inactive record

2 posts, 0 answers
  1. Zakir
    Zakir avatar
    7 posts
    Member since:
    Oct 2013

    Posted 17 Sep 2014 Link to this post

    Hi,

    Is it possible to disable auto complete selection event for inactive records only and on selection of inactive record, auto complete popup should not close?

    Thank You
    Zakir
  2. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 19 Sep 2014 Link to this post

    Hello Zakir,

    Thank you for contacting us.

    The desired functionality can be achieved only in token mode, using the OnClientDropDownClosing and OnClientEntryAdding events. Here's an example:
    function OnClientEntryAdding(sender, args) {
        if (args.get_entry().get_text() === "Aniseed Syrup") {
            args.set_cancel(true);
        }
    }
     
    function OnClientDropDownClosing(sender, args) {
        if (sender._dropDown.get_activeItem().get_text() === "Aniseed Syrup") {
            args.set_cancel(true);
        }
    }

    Hope this was helfpul.

    Regards,
    Bozhidar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

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