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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:28:11+00:00 2026-06-11T18:28:11+00:00

My ASP.NET MVC-3 application is using the previous version of Telerik MVC Extensions combobox

  • 0

My ASP.NET MVC-3 application is using the previous version of Telerik MVC Extensions combobox. I am trying to change the style of an item in the list.

Here is the model:

public class Person
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public bool DisplayBold { get; set; }
        public string Value
        {
            get
            {
                return string.Format("{0}|{1}", this.Id, this.DisplayBold.ToString());
            }
        }
    }

The Controller:

var people = new List<Person>();
people.Add(new Person { Id = 1, Name = "John Doe", DisplayBold = true });
people.Add(new Person { Id = 2, Name = "Jayne Doe", DisplayBold = false });
ViewData["people"] = people;
return View();

The Combobox:

<% Html.Telerik().ComboBox()
   .Name("ComboBox")
           .BindTo(new SelectList((IEnumerable<Person>)ViewData["people"], "Id", "Name"))
           .ClientEvents(events => events
        .OnChange("ComboBox_onChange")
        .OnLoad("ComboBox_onLoad")
        .OnOpen("ComboBox_OnOpen"))
    .Render();
%>

I tried the following and it did change the first item:

var item = combobox.dropDown.$items.first();
item.addClass('test');

However when I tried to change the CSS when it is Ture:

var combobox = $(this).data('tComboBox');
$.each(combobox.dropDown.$items, function (idx, item) {
    if (combobox.data[idx].Value.split('|')[1] == 'True') {
        alert(item);
        $(item).addClass('test');

    }
});

It did not work!

  • 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-11T18:28:12+00:00Added an answer on June 11, 2026 at 6:28 pm

    This is the version after user373721 marked this as answered

    While i was rewriting my previous answer and browsing the forums user373721 marked my old revision as answered.

    I am sorry i searched the forum of telerik to see how you could hook into the databinding to influence the css. I could not find a good match to your problem.

    One muddy workaround (getting desperated here) could be to add html to the names that should be displayed bold:

    public class Person
    {
        public string NameText { get; }
        {
            get
            {
                if(this.DisplayBold) {
                     return "<b>" + this.Name + "</b>";
                } else
                     return this.Name; 
            }
        }
    }
    

    So instead of binding to Name you would bind to NameText.
    You may need to take care of html-conversion.

    In my last search i found a post that may help. And now i found a post that could be from you

    • By the way in the forums i have read that there were several bug
      fixes that could be important for your goal.
      Which telerik mvc-release are you using?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a quick ASP.NET MVC 3 application using the RC version
I'm adding an object to a list within an ASP.NET MVC 3 application using
In my ASP.NET MVC application I am using a select list control to generate
I am trying to stress test an ASP.Net MVC application using the WCAT tool.
I have a small ASP.NET MVC application developed using the latest beta version. What
I'm trying to add logging through AOP in an ASP.NET MVC application using: Enterprise
I have an ASP.NET MVC application using Authorization Attributes on Controllers and Actions. This
I have a ASP.NET MVC application using NHibernate and the application runs fine when
I've made some graphs in my ASP.Net MVC application using the ASP.Net MSChart control.
I am creating an editor in asp.net MVC application using ckeditor. In textarea i

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.