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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:34:57+00:00 2026-06-10T08:34:57+00:00

I am using Ryan Niemeyer`s Knockout-Kendo.js library. I have a kendodropdown defined like this:

  • 0

I am using Ryan Niemeyer`s Knockout-Kendo.js library. I have a kendodropdown defined like this:

<input id="availableLanguagesDropdown" data-bind="kendoDropDownList: { data: Languages, value:Language }" onchange="onAvailableLanguageChangeHandler();" />

where Languages is observable array and Language is an observable. In my application items are removed from the Languages array ( which is the datasource for the kendodropdown). When the are no languages left in the array the kendodropdown shows the last available language.

I am assinging empty value on Language like this:

omega.Language("");

But still the last available language is visualized in the dropdown. I think I should refresh the kendodropdown. In the documentation for the kendoUI it is done like this:

var dropdownlist = $("dropdownlist").data("kendoDropDownList");
// re-render the items in drop-down list.
dropdownlist.refresh();

But as I am using the Knockout-Kendo.js library I am not sure how can I do this. Can someone please tell me how to refresh the dropdown when there are not items in it? And will this help me to show empty dropdown when there are no items in it? Thank You for your time!

  • 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-10T08:34:58+00:00Added an answer on June 10, 2026 at 8:34 am

    The bindings will provide the widget to you in an observable, if you pass the widget argument. It looks like simply calling refresh() does not do the trick. I had to use the text method to see it to empty.

    Something like:

    <input id="availableLanguagesDropdown" data-bind="kendoDropDownList: { data: Languages, value:Language, widget: dropDown }" />
    

    With JS:

    var ViewModel = function() {
        this.Languages = ko.observableArray(["one", "two", "three"]);
        this.Language = ko.observable("two");
    
        this.dropDown = ko.observable();
    
        this.removeLanguages = function() {
            this.Languages([]);
            this.Language("");
            this.dropDown().text("");
        };
    };
    

    Sample here: http://jsfiddle.net/rniemeyer/GQqwY/

    Seems like something that I should try to workaround in the library itself. I always hoped that getting access to the widget and calling its methods would be only for advanced or last resort use.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Much like this question , I too am using Ryan Bates's nifty_scaffold. It has
I'm using the excellent validate CFC by Ryan J. Heldt http://validation.riaforge.org/ but have a
I'm using ryan bates' plugin nested_form and i have been trying to write my
I'm using declarative roles , a Ryan Bates 'railscast' tutorial. I would like to
I have created a new project using devise login according to Ryan Bates' railscast
I'm using Ryan Bates nested_form gem . I'd like to be able to control
I have a big problem when using Ryan Bates' excellent Nested_form gem. In fact,
I'm using jquery_token_input after following Ryan Bates railscast #258 and this is the code
I'm using Ryan Bates's nifty:authentication , and starting testing with Rspec. Fought with this
I'm attempting to implement nested object forms for my site, using Ryan Daigle's blog

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.