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 6652775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:10:59+00:00 2026-05-26T01:10:59+00:00

In my JQgrid i have a ui atocomplete column which are Case sensitive. For

  • 0

In my JQgrid i have a ui atocomplete column which are Case sensitive.

For example i have 2 Items in my grid: Ivan and ivan, if i type “i” autocomplete will return only ivan.
I have tryed to make a function inside of source: but i failed since my ajax call always return object Object instead of an item. Any ideas?

Code for autocomplete:

$(elem).autocomplete({
                      delay: 0,
                      minLength: 0,

                      source: function (req, response) {
                          alert(req);
                          $.ajax({
                              mtype: "post",
                              url: '@Url.Action("GetBrands")',
                               dataType: "json",
                              async: false,
                              cache: false,
                              data: { term: req },
                              success: function (data) {
                                  alert(data);

                                  var re = $.ui.autocomplete.escapeRegex(req.term);

                                  var matcher = new RegExp("^" + re, "i");

                                  response($.grep(data, function (item) { return matcher.test(item.value); }));

                              }

                          });

                      },

Controller side code:

 public virtual JsonResult GetBrands(string term)
    {
        if (term == null) term = string.Empty;

        var vendorId = _service.GetVendorIdByUsername(GetUserName());

        var brands = _service.GetBrandsByVendor(vendorId);
        var brand = new BrandsViewModel();
        brand.BrandName = "Opret ny Brand...";
        brands.Add(brand);

        foreach (var brandsViewModel in brands)
        {

            if (brandsViewModel.BrandName == "Intet")
            {
                brandsViewModel.BrandName = "";
            }
        }

        return Json((from item in brands
                     where item.BrandName.Contains(term)
                     select new
                                {
                                    value = item.BrandName
                                    //votes = item.Votes,
                                }).ToArray(),
                    JsonRequestBehavior.AllowGet);
    }
  • 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-05-26T01:10:59+00:00Added an answer on May 26, 2026 at 1:10 am

    convert it all to one case when compering:

    public virtual JsonResult GetBrands(string term)
        {
            if (term == null) term = string.Empty;
            term = term.ToLower();
            var vendorId = _service.GetVendorIdByUsername(GetUserName());
    
            var brands = _service.GetBrandsByVendor(vendorId);
            var brand = new BrandsViewModel();
            brand.BrandName = "Opret ny Brand...";
            brands.Add(brand);
    
            foreach (var brandsViewModel in brands)
            {
    
                if (brandsViewModel.BrandName == "Intet")
                {
                    brandsViewModel.BrandName = "";
                }
            }
    
            return Json((from item in brands
                         where item.BrandName.ToLower().Contains(term)
                         select new
                                    {
                                        value = item.BrandName
                                        //votes = item.Votes,
                                    }).ToArray(),
                        JsonRequestBehavior.AllowGet);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jqGrid with which users will select records. A large number of
I have a case where I need to update a jqgrid based on some
I have a asp.net webforms page in which I'm using the jqGrid component. The
Suppose I have the following (shortened for simplicity): jQuery(#grid).jqGrid({ ... ondblClickRow: function() { //
Is there a way in jqgrid to have an editable column that uses a
Is it possible to make it so that a jqGrid will have a width
I have a jqGrid in an ASP.Net MVC. The grid is defined as: $(#list).jqGrid({
I have a jqGrid on which clicking of a row should render a partial
Experts, I have JQGrid with custom template column like Edit. the following screen display
I have a jqGrid with four columns and in which i get the rows

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.