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

  • Home
  • SEARCH
  • 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 5849931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T13:04:11+00:00 2026-05-22T13:04:11+00:00

I am implementing two dropdown lists where Fund dropdown list is populated by the

  • 0

I am implementing two dropdown lists where “Fund” dropdown list is populated by the selection of “Close Date” dropdown list (cascading). The problem is that after the Ajax update the “Fund” dropdown list displays a blank value instead of the first selection. I verified that the returned selections have the first item marked as “selected”. I have also tried a couple things to default the selected index of the dropdown after update. So how do I get the dropdown to default to a particular selection afetr it’s been updated. Lised below are code fragments for the definition of the dropdown lists and the javascript function that runs when “Close Date” is selected.

using Telerik 2011.1.315 and JQuery 1.5.1

<script type="text/javascript">
    fundListUrl = '<%= Url.Action("GetFundList","Admin") %>'
    function GetFundList(e)
    {
        var fundDropDown = $('#FundId');
        var fundDropDownData = fundDropDown.data('tDropDownList');
        fundDropDownData.loader.showBusy();
        $.get(fundListUrl, { dateId: e.value }, function (data) {
            fundDropDownData.dataBind(data);
            fundDropDownData.loader.hideBusy();
            fundDropDown.attr('selectedIndex', 0); // Not Working
        });
    }
</script>

…

<table>
    <tr>
    <td class="editlabel">Close Date:</td>
    <td>
        <%= Html.Telerik().DropDownListFor(o => o.ReportingPeriodDateId)
            .BindTo((SelectList)ViewData["closeDateList"])
            .ClientEvents(events => events.OnChange("GetFundList"))
        %>
    </td>
    </tr>
    <tr>
    <td class="editlabel">Fund:</td>
    <td>
        <%= Html.Telerik().DropDownListFor(o=>o.FundId)
            .BindTo((SelectList)ViewData["fundList"])
            .HtmlAttributes(new { style = "width: 40em;" })
        %>
    </td>
    </tr>
</table>
  • 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-22T13:04:12+00:00Added an answer on May 22, 2026 at 1:04 pm

    You should be able to select a combo item either by its index or its value (if you defined values for the combobox items beforehand) as follows:

    <script type="text/javascript">
        fundListUrl = '<%= Url.Action("GetFundList","Admin") %>'
        function GetFundList(e)
        {
            var fundDropDown = $('#FundId');
            var fundDropDownData = fundDropDown.data('tDropDownList');
            fundDropDownData.loader.showBusy();
            $.get(fundListUrl, { dateId: e.value }, function (data) {
                fundDropDownData.dataBind(data);
                fundDropDownData.loader.hideBusy();
                fundDropDown.select(0); // select first combo item, or use fundDropDown.value('0') in case the first combo item has value set to 0
            });
        }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Fixed: See notes at bottom I am implementing a generic class that supports two
I am implementing two processes on a LynxOS SE (POSIX conformant) system that will
I have a need of implementing two apps that will exchange data with each
I have two lists based on the same class. I would like one list
I'm implementing a document server. Currently, if two users open the same document, then
I have an internal application that I needs to have a drop down list
Assume I have a class implementing two or more COM interfaces: class CMyClass :
Possible Duplicate: StructureMap singleton usage (A class implementing two interface) I'm currently designing a
Assume I have a class implementing two or more COM interfaces (exactly as here
Hy, I am implementing a asp.net web application, and I have two webform files,

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.