Browser:
Microsoft Edge 44.18362.449.0
Telerik Control:
RadCombobox
Teleri Version: Version=2017.3.913.45,
Issue:
When a item is selected and a postback is occured, the SelectedValue returns an empty string.
Expected behavior:
The correct SelectedValue should be return.
Thing that have been tried so far:
1: upgrade the telerik to the latest version (2020.114) ---> issue persists
2: set autopostback to "true" problem solved
3: use other browsers (chrome, FireFox, new Version 79.0.309.68 ) issue disappears
Sample code:
1: aspx
<
telerik:radcombobox
id
=
"ddlSupplier"
runat
=
"server"
skin
=
"Material"
rendermode
=
"Lightweight"
cssclass
=
"materializeit"
enableloadondemand
=
"true"
inputcssclass
=
"browser-default"
width
=
"100%"
filter
=
"Contains"
highlighttemplateditems
=
"true"
showmoreresultsbox
=
"false"
onitemsrequested
=
"ddlSupplier_ItemsRequested"
autopostback
=
"false"
>
</
telerik:radcombobox
>
2: code behind
protected void Page_Load(object sender, EventArgs e)
{
}
protected void saveIssue_Click(object sender, EventArgs e)
{
}
protected void ddlSupplier_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
RadComboBoxItem li = new RadComboBoxItem("Alan Jones (Brunel Systems Pty Ltd, test site)", "123");
ddlSupplier.Items.Add(li);
li = new RadComboBoxItem("Jackie Chiu (Optimum Construction, Optimum Construction (Sydney)) ", "23" );
ddlSupplier.Items.Add(li);
li = new RadComboBoxItem("Erik Baker (Optimum Construction, Optimum Construction (Sydney))", "2323");
ddlSupplier.Items.Add(li);
}
protected void b_Click(object sender, EventArgs e)
{
var a = ddlSupplier.SelectedValue; // most of the time returns "" for Edge
}
The OnClientTextChange event is triggered inconsistently in RadComboBox.
Typing custom text in the following RadComboBox and pressing enter does not fire the event:
<script lang="javascript" type="text/javascript">
function OnClientTextChange(sender, eventArgs) {
alert("You typed " + sender.get_text());
}
</script>
<telerik:RadComboBox
ID="RadComboBox1"
runat="server"
AllowCustomText="true"
OnClientTextChange="OnClientTextChange">
<Items>
<telerik:RadComboBoxItem Text="item1" Value="item1" />
<telerik:RadComboBoxItem Text="item12" Value="item12" />
<telerik:RadComboBoxItem Text="aaaa" Value="aaa" />
<telerik:RadComboBoxItem Text="bbbb" Value="bbb" />
<telerik:RadComboBoxItem Text="AAAA1" Value="AAAA1" />
<telerik:RadComboBoxItem Text="bbbb1" Value="bbb1" />
<telerik:RadComboBoxItem Text="item11" Value="item11" />
</Items>
</telerik:RadComboBox>
At the first time requesting data, RadClientDataSource sends multiple requests to the server. All subsequent requests for Paging, Sorting work as expected.
I recently upgraded from ASP.NET AJAX 2014 to 2022 and ran into an issue with a RadComboBox. It can be reproduced with this code:
Test.aspx
<telerik:RadScriptManager ID="scriptManager" runat="server" />
<telerik:RadComboBox ID="rcb" runat="server" Label="Medication:" AutoPostBack="true"
Width="250" OnSelectedIndexChanged="rcb_SelectedIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="-- select --" Value="" />
<telerik:RadComboBoxItem Text="Benztropine 0.5 mg " />
<telerik:RadComboBoxItem Text="Buspirone 10 MG" />
<telerik:RadComboBoxItem Text="Haloperidol 100mg/ml" />
<telerik:RadComboBoxItem Text="Metaprolol 25 mg" />
<telerik:RadComboBoxItem Text="Quetiapin/Seroquel 400 mg" />
<telerik:RadComboBoxItem Text="Trazadone 150 mg" />
<telerik:RadComboBoxItem Text="Vitamin D2 50,000 units" />
</Items>
</telerik:RadComboBox>
<label>SelectedIndex</label> <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
Test.aspx.cs
protected void rcb_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
Label1.Text = rcb.SelectedIndex.ToString();
rcb.SelectedIndex = 0;
}
When "Benztropine 0.5 mg " is selected, the SelectedIndex in the selected index changed method is incorrectly set to 0, instead of 1. Selecting any other item in the list results in the correct SelectedIndex. I spent a lot of time debugging the code until I noticed that "Benztropine 0.5 mg " has a space at the end.
I found two workarounds:
1. Trim the trailing space from text.
2. Add values for each item.
This was not an issue with the old 2014 version. Is this a bug or am I missing something?
Hello, I have a resize problem for Radcombobox .I can't change the height of default textbox of combobox. Could you please help me?
Please check the attached images for more details.
From customer feedback: Label display style is not taken into consideration when calculating the width of the combobox e.g. if the display style is block, the label and combo should be on separate lines. In terms they should be equally wide. However currently the combo is squashed to a minimum width.
We are using the combo box drop down: <telerik:RadComboBox ID="rcbAccounts" runat="server" Width="360" DropDownWidth="810" OffsetX="-200" DataValueField="AcctNumber" DataTextField="DisplayString" AutoPostBack="True" AllowCustomText="True" Filter="Contains" ExpandDelay="0" CollapseDelay="0" MaxHeight="300" OnClientDropDownOpening="OnRcbAccountsOpening" Skin="CustomTelerikSkin" EnableEmbeddedSkins="false" EnableViewState="false" EnableScreenBoundaryDetection="true" > <HeaderTemplate> <ul> <li class="rcbColumn" style="width: 330px">Name</li> <li class="rcbColumn" style="width: 70px">Acct #</li> <li class="rcbColumn" style="width: 90px">Type</li> <li class="rcbColumn" style="width: 150px">Address</li> <li class="rcbColumn" style="width: 110px">City</li> </ul> </HeaderTemplate> <ItemTemplate> <ul> <li class="rcbColumn" style="width: 330px"> <%#DataBinder.Eval(Container.DataItem, EC.ACCT_NAME).ToString()%></li> <li class="rcbColumn" style="width: 70px"> <%#DataBinder.Eval(Container.DataItem, EC.ACCT_NO).ToString()%></li> <li class="rcbColumn" style="width: 90px"> <%#DataBinder.Eval(Container.DataItem, EC.ACCT_TYPE).ToString()%></li> <li class="rcbColumn" style="width: 150px"> <%#DataBinder.Eval(Container.DataItem, EC.ACCT_ADDR1).ToString()%></li> <li class="rcbColumn" style="width: 110px"> <%#DataBinder.Eval(Container.DataItem, EC.ACCT_CITY).ToString()%></li> </ul> </ItemTemplate> </telerik:RadComboBox> It looks like the attached at runtime. My question is: Can we align the dropdown area to be left-aligned with the control? In some cases, the left part of the data gets cut off by the browser window.
RadComboBox will open up in case that ScreenBoundaryDetection is enabled and there is not enough space below even if the space above is much less than below. Like in a vertically narrow frame with the ComboBox being at the top of the page. It seems better to compare the space below with above and put it where there is more space.
ComboBox keeps the dropdown aligned to either sides of input field. If due to content overflow e.g in a small frame input field is placed slightly out of viewport then it would be better to check the boundaries if ScreenBoundaryDetection is enabled and keep the dropdown in view and not necessarily aligned with input.
There is no RTL boundary detection in ComboBox, e.g. no _elementOverflowsLeftScreenBorder in RadComboBox.DropDown.js
When RadCombobox is inside fixed div element and is expanded it doesn't scroll as expected. The dropdown container should stay fixed as the combo's input element.
Hi There, i am working on asp.net 4.0 with telerik asp.net ajax control. The problem i am facing is that all the controls are not working but the same files were working in asp.net 3.5, for example i am attaching a error page which is showing a radcombobox as a text box. I am not being able to figure out the issue/bug whether it is because of RadStyleSheetManager or RadScriptManager. Kindly help me with this issue.
There is problem selected value radcombox with Ajax modal pop up pls suggest the solution for that
Using the .get_value() in the OnClientDropDownClosed event of RadComboBox, produces empty value. The OnClientSelectedIndexChanged event works fine, but I need to be able to kick off the javascript even if the selected index doesn't change. My RadComboBox element: <telerik:RadComboBox ID="CustomerSearch" runat="server" Width="180" Height="160" MarkFirstMatch="true" AllowCustomText="true" CssClass="CustomerSearch" AutoPostBack="false" EnableLoadOnDemand="true" EnableVirtualScrolling="true" OnItemsRequested="CustomerSearch_ItemsRequested" OnClientDropDownClosed="searchnav" EmptyMessage="Select a customer" DataSourceID="dsCustomer" DataTextField="CustomerName" DataValueField="NavPath" BackColor="White" Skin="Forest" /> My SQLDataSource element: <asp:SqlDataSource ID="dsCustomer" runat="server" SelectCommand="CustomerSearchName" SelectCommandType="StoredProcedure"> </asp:SqlDataSource> My Javascript: <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function searchnav(sender, args) { var iframe = document.getElementById('ctl00_iMainPages'); iframe.src = sender.get_value(); } </script> </telerik:RadScriptBlock>