Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8699991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:05:07+00:00 2026-06-13T02:05:07+00:00

I am using kendoUI auto complete. To display each record in the box format

  • 0

I am using kendoUI auto complete. To display each record in the box format with “x” mark I have implemented like

$("#roleAuto").kendoAutoComplete({
                       dataSource: roledata,
                       filter: "startswith",
                       placeholder: "Select Role...",
                       select: function (e, ui) {
                           alert("hi");
                           $(".roleSelection:checked").each(function () {
                               var role = $(this).attr("data-name"),
                                     var  span = $("<span>").text(role),
                                        a = $("<a>").addClass("remove").attr({
                                        title: "Remove " + role
                                        }).text("x").appendTo(span);
                               alert(role);
                               span.insertBefore("#roleAuto");
                                $("#Roles").click(function () {
                                 $("#roleAuto").focus();
                                 });
             $(".remove", document.getElementById("Roles")).live("click", function () {
                     $(this).parent().remove();
                     if ($("#Roles span").length === 0) {
                     $("#roleAuto").css("top", 0);
                           }
                       });
                   });

I am able to display each record in the box with “x” symbol. If I click on the “x” mark I am able to remove the record, I want that removed item ID value. How can I get this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:05:08+00:00Added an answer on June 13, 2026 at 2:05 am

    There is a method for the autocomplete (and many of the other data-bound widgets):

    kendo.ui.widget.dataItem(index);

    And a method on the event called:

    event.item.index();

    Documentation for the AutoComplete-Methods: AutoComplete Documentation

    So, as your first line in the select function, you could write:

    var dataItem = this.dataItem(e.item.index());
    

    Your live-method for the click-event would then look like the following:

    $(".remove", document.getElementById("Roles")).live("click", function () {
        alert(dataItem.Id); //Or in whichever property your Id is stored.
        $(this).parent().remove();
        if ($("#Roles span").length === 0) {
            $("#roleAuto").css("top", 0);
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using KendoUI Grid to show data. I have server paging working like a
I have a MVC3 ASP.NET Project in which I am using jQuery and KendoUI
I have a form with some input fields. I am using the tabStrip KendoUI
I have the following issue when using KendoUI Grid with a column template: My
I am using RPNiemeyer`s Knockout-Kendo.js library. I have a kendoui tabstrip. I looked through
Using MVVM. I have a DataTemplate which I am using to display an expander
I am using Ryan Niemeyer`s Knockout-Kendo.js library. I have a kendodropdown defined like this:
I'm using a KendoUI KendoGrid. I have a column with delete button or destroy
I'm New to KendoUI. (Who isn't right?) I have a grid and I'm using
I'm using KendoUI line graph. I have labels on a line graph and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.