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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:33:48+00:00 2026-05-22T16:33:48+00:00

how to bind Telerik MVC combobox with US States List and pass values from

  • 0

how to bind Telerik MVC combobox with US States List and pass values from View to controller?

Binding Telerik MVC ComboBox with US State List and passing Selected value back to Controller.

I want to bind Telerik MVC Combobox using Javascript function . I have created US State List in a Javascript Function and I am assigning this US State List to my ComboBox…To send selected US State back to Controller , I have taken a HTML.TextBoxFor and set its visibility to hidden … in my controller I am trying to access value of this perticular TextBox but it is always showing null .. Plz Help

following is my code:-

    <%= Html.Telerik().ComboBox()
    .Name("ComboBox")
    .ClientEvents(events => events
        .OnDataBinding("onDataBinding")
                           .OnChange("getComboBox")
    )
    %>
    <%: Html.TextBoxFor(model => model.EnrolRegAcntDescriptor.state, new { ID = "statetext", style = "visibility:hidden;width:10px" })%>
     <script type="text/javascript">
    function getComboBox() {
        //"ComboBox" is the value specified by the Name() method.
        debugger;
        var combobox = document.getElementById('ComboBox-value').value;
        var combotext = document.getElementById('ComboBox-input').value; //$("#ComboBox").data("tComboBox");
        var index = $("#ComboBox").data("tComboBox").value();
        //  var text = combotext.options[combotext.selectedIndex].value;
      //  var MySelectedvalue = document.getElementByid('tComboBox').options[document.getElementByid('tComboBox').selectedIndex].value
        var states = document.getElementById('statetext').value;
        states = combotext;
                 //   comboBox.select(index);
        //alert(index);
        return states;
    }

    <script type="text/javascript">
function onDataBinding(e) {
        var comboBox = $('#ComboBox').data('tComboBox');
        comboBox.dataBind([
            { Text: "ALABAMA", Value: "ALABAMA" },
            { Text: "ALASKA", Value: "ALASKA", Selected: true },
            { Text: "ARIZONA ", Value: "ARIZONA" },
            { Text: "ARKANSAS", Value: "ARKANSAS" },
            { Text: "CALIFORNIA", Value: "CALIFORNIA" },
            { Text: "COLORADO", Value: "COLORADO" },
            { Text: "CONNECTICUT", Value: "CONNECTICUT" },
            { Text: "DELAWARE ", Value: "DELAWARE" },
            { Text: "FLORIDA", Value: "FLORIDA" },
            { Text: "GEORGIA", Value: "GEORGIA" },
            { Text: "HAWAII", Value: "HAWAII" },
            { Text: "IDAHO", Value: "IDAHO" },
            { Text: "ILLINOIS", Value: "ILLINOIS" },
            { Text: "INDIANA", Value: "INDIANA" },
            { Text: "IOWA", Value: "IOWA" },
            { Text: "KANSAS", Value: "KANSAS" },
            { Text: "KENTUCKY", Value: "KENTUCKY" },
            { Text: "LOUISIANA", Value: "LOUISIANA" },
            { Text: "MAINE", Value: "MAINE" },
            { Text: "MARYLAND", Value: "MARYLAND" },
            { Text: "MASSACHUSETTS", Value: "MASSACHUSETTS" },
            { Text: "MICHIGAN", Value: "MICHIGAN" },
            { Text: "MINNESOTA", Value: "MINNESOTA" },
            { Text: "MISSISSIPPI", Value: "MISSISSIPPI" },
            { Text: "MISSOURI", Value: "MISSOURI" },
            { Text: "MONTANA", Value: "MONTANA" },
            { Text: "NEBRASKA", Value: "NEBRASKA" },
            { Text: "NEVADA", Value: "NEVADA" },
            { Text: "NEW HAMPSHIRE", Value: "NEW HAMPSHIRE" },
            { Text: "NEW JERSEY", Value: "NEW JERSEY" },
            { Text: "NEW MEXICO", Value: "NEW MEXICO" },
            { Text: "NEW YORK", Value: "NEW YORK" },
            { Text: "NORTH CAROLINA", Value: "NORTH CAROLINA" },
            { Text: "NORTH DAKOTA", Value: "NORTH DAKOTA" },
            { Text: "OHIO", Value: "OHIO" },
            { Text: "OKLAHOMA", Value: "OKLAHOMA" },
            { Text: "OREGON", Value: "OREGON" },
            { Text: "PALAU", Value: "PALAU" },
            { Text: "PENNSYLVANIA", Value: "PENNSYLVANIA" },
            { Text: "RHODE ISLAND", Value: "RHODE ISLAND" },
            { Text: "SOUTH CAROLINA", Value: "SOUTH CAROLINA" },
            { Text: "SOUTH DAKOTA", Value: "SOUTH DAKOTA" },
            { Text: "TENNESSEE", Value: "TENNESSEE" },
            { Text: "TEXAS", Value: "TEXAS" },
            { Text: "UTAH", Value: "UTAH" },
            { Text: "VERMONT", Value: "VERMONT" },
            { Text: "VERGINIA", Value: "VERGINIA" },
            { Text: "WASHINGTON", Value: "WASHINGTON" },
            { Text: "WEST VIRGINIA", Value: "WEST VIRGINIA" },
            { Text: "WISCONSIN", Value: "WISCONSIN" },
            { Text: "WYOMING", Value: "WYOMING" }
        ], true /*preserve state*/);
    }

  • 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-22T16:33:49+00:00Added an answer on May 22, 2026 at 4:33 pm

    Found the answer on my own .Done few changes in the code as follows ..

          <%: Html.TextBoxFor(model => model.EnrolRegAcntDescriptor.state, new { type="Hidden", ID = "statetext", style = "width:10px" })%> 
          function getComboBox() {
    
    
            var combobox = document.getElementById('ComboBox-value').value;
            var combotext = document.getElementById('ComboBox-input').value; 
            var index = $("#ComboBox").data("tComboBox").value();
    
            var states = document.getElementById('statetext').value;
            document.getElementById('statetext').value = index;                    
          //  alert(index);
            return states;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a list of PlanItems bind to telerik RadGrid and have two views
Why won't my Telerik ComboBoxFor bind my value and fill my ComboBox via AJAX?
How can you bind data from an SQL Server to a telerik line chart?
I need to have a Telerik MVC grid with a combobox (in edit mode)
To bind to the current DataContext in XAML you can use: <TextBlock Text={Binding} />
I bind the ItemsSource of a ComboBox to an ObservableCollection<MyClass> . In code I
I have two combobox. I need get some value from first combobox1 after combobox1
How do I bind data or info from a database table to the labels
I want to bind the value to dropdownlist, the value is retrieved from database.
I have been using telerik extensions for an asp.net mvc project, more specifically 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.