Can not remove the item which is not selected on client side.

2 posts, 1 answers
  1. Tracy
    Tracy avatar
    8 posts
    Member since:
    Mar 2013

    Posted 03 Mar 2015 Link to this post

    for example:
    <!DOCTYPE html">
    <head runat="server">
    <script type="text/javascript">
    function pageLoad()
    <form runat="server">
    <Telerik:RadScriptManager runat=server />
    <Telerik:RadDropDownList runat=server ID=DropDownList>
            <Telerik:DropDownListItem Text=1 />
            <Telerik:DropDownListItem Text=2 Selected />
            <Telerik:DropDownListItem Text=3 />
    Open the page above, then select the item "3", It will cause that the item "2" will not able to select.
    The Version of my RadControl is "2014 Q1"
  2. Answer
    Bozhidar avatar
    1142 posts

    Posted 03 Mar 2015 Link to this post


    I confirm that this is a bug in the DropDownList control, which we will address as soon as we can. In the meantime you can use the following workaround:
    function pageLoad() {
        var dropDownList = $find("DropDownList")
        var selectedIndex = dropDownList._selectedIndex;
        var indexToRemove = 0;
        if (selectedIndex > indexToRemove) {
            dropDownList._selectedIndex = selectedIndex - 1;


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top