This is a migrated thread and some comments may be shown as answers.

Issues caused by updated version

1 Answer 35 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
A
Top achievements
Rank 1
A asked on 08 Aug 2016, 01:19 PM

Using an older version of telerik, we have a control formed like so:

[code]
<asp:DropDownList ID="ddlField" Visible="false" runat="server" AutoPostBack="true"
    Height="20px" Width="126px" AppendDataBoundItems="True" DataSourceID="FieldLookupDS"
    DataTextField="FieldName" DataValueField="FieldPk" CausesValidation="True">
</asp:DropDownList>
<telerik:RadComboBox runat="server" ID="radCbField" DataSourceID="FieldLookupDS"
    DataTextField="FieldName" DataValueField="FieldPk" Width="130px" AllowCustomText="true"
    Text="Select">
    <ItemTemplate>
        <asp:CheckBox runat="server" ID="cbField" AutoPostBack="true" Text='<%#Eval("FieldName")%>' />
    </ItemTemplate>
</telerik:RadComboBox>
[/code]

Without change, the old version of the telerik controls allow us to select multiple items in a drop down list with checkboxes, while the default option field remains in place. After updating to a newer version of telerik, clicking on the checkboxes themselves maintains he same effect, but clicking on the label makes that label appear in the option field instead of the desired default prompt. This has been verified by simply switching the versions we are using. 

Is there any guidance on how to re-implement this functionality in newer versions? 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 11 Aug 2016, 06:59 AM
Hello,

If I understand correctly what you are trying to achieve, you want the ComboBox not to show the selected item's text in its input, instead to show "Select". You can do that by subscribing to the OnClientSelectedIndexChanged the event and in its handler set the ComboBox' Text with the set_text() method:
<telerik:RadComboBox runat="server" ID="radCbField" DataSourceID="FieldLookupDS"
    DataTextField="FieldName" DataValueField="FieldPk" Width="130px" AllowCustomText="true"
    Text="Select" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged">

function OnClientSelectedIndexChanged(sender, args) {
    sender.set_text("Select");
}


Regards,
Ivan Danchev
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
DropDownList
Asked by
A
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or