I have problem that only happens in IE 9. The text property of ComboBox always returns empty value.
<
asp:UpdatePanel
ID
=
"RecurrenceType"
runat
=
"server"
UpdateMode
=
"Conditional"
>
<
Triggers
>
<
asp:PostBackTrigger
ControlID
=
"rcbName"
/>
</
Triggers
>
<
ContentTemplate
>
<
table
class
=
"style1"
>
<
tr
>
<
td
class
=
"style4"
>
Name:
</
td
>
<
td
class
=
"style3"
>
<
telerik:RadComboBox
ID
=
"rcbName"
runat
=
"server"
Width
=
"406px"
Height
=
"125px"
EmptyMessage
=
"Type media item name"
AllowCustomText
=
"true"
MarkFirstMatch
=
"true"
Sort
=
"Ascending"
>
</
telerik:RadComboBox
>
</
td
>
</
tr
>
</
table
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
Any help would be appreciated.
- Igor
6 Answers, 1 is accepted
I've tested your scenario and the Text property is working as expected as you could see on this clip here.
Could you be more specific when exactly you are trying to get the Text of the RadComboBox?
Greetings,
Dimitar Terziev
the Telerik team
<
telerik:RadComboBox
ID
=
"rcbDynamicText"
Height
=
"200px"
Width
=
"260px"
EnableAutomaticLoadOnDemand
=
"True"
OnClientItemsRequesting
=
"SearchBoxRequestingHandler"
OnClientKeyPressing
=
"SearchBoxEnterHandler"
OnSelectedIndexChanged
=
"rcbDynamicText_SelectedIndexChanged"
AutoPostBack
=
"true"
Filter
=
"Contains"
ItemsPerRequest
=
"10"
ShowMoreResultsBox
=
"True"
EnableVirtualScrolling
=
"True"
DataValueField
=
"Name"
DataTextField
=
"Name"
DataSourceID
=
"LDSTPII"
LoadingMessage
=
"Searching Performers..."
runat
=
"server"
/>
<%@ Control Language=
"C#"
ClassName=
"RadComboTest"
%>
<script runat=
"server"
>
protected
void
Page_Load(
object
sender, EventArgs e)
{
rcbExample.Items.Add(
new
RadComboBoxItem(
"Example One"
));
rcbExample.Items.Add(
new
RadComboBoxItem(
"Example Two"
));
rcbExample.Items.Add(
new
RadComboBoxItem(
"Example Three"
));
rcbExample.Items.Add(
new
RadComboBoxItem(
"Example Four"
));
rcbExample.Items.Add(
new
RadComboBoxItem(
"Example Five"
));
}
protected
void
rcbExample_SelectedIndexChanged(
object
Sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
lblValue.Text = rcbExample.Text;
}
protected
void
cmdTest_Click(
object
sender, EventArgs e)
{
lblValue.Text = rcbExample.Text;
}
</script>
<telerik:RadScriptBlock ID=
"RadScriptBlock1"
runat=
"server"
>
<script language=
"javascript"
type=
"text/javascript"
>
function TestBoxEnterHandler(sender, e) {
if
(e.get_domEvent().keyCode == 13) {
document.getElementById(
'<%= cmdTest.ClientID %>'
).click();
return
false
;
}
}
function TestBoxRequestingHandler(sender, eventArgs) {
if
(sender.get_text().length < 3) {
eventArgs.set_cancel(
true
);
}
}
</script>
</telerik:RadScriptBlock>
<telerik:RadComboBox ID=
"rcbExample"
Height=
"200px"
Width=
"260px"
AllowCustomText=
"true"
OnClientKeyPressing=
"TestBoxEnterHandler"
OnSelectedIndexChanged=
"rcbExample_SelectedIndexChanged"
AutoPostBack=
"true"
Filter=
"Contains"
ItemsPerRequest=
"10"
runat=
"server"
/>
<asp:Button ID=
"cmdTest"
runat=
"server"
Text=
"Submit"
onclick=
"cmdTest_Click"
/><br />
<asp:Label ID=
"lblValue"
runat=
"server"
/>
Is there a workaround? How do I fix it?
I've tested the sample code you have provided, but the Text property is working properly on my side. Could you clarify which version of the controls you are using?
Please refer to the following video showing the behavior on my side.
In case you continue to experience the issue, open a support ticket and provide us with a runnable sample page with the issue being reproduced so we could examine it locally.
All the best,
Dimitar Terziev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I actually received another message back that showed the versions it was an bug in:
Hello Jason,
Thank you for contacting us.
There has been a problem with the version of the controls that you are using (2010.1.1317) in IE9,
which has already being fixed in the 2011.1.315 version. I've tested your sample user control with
the 2011.1.315 version and it was working properly on my side.
Please try to upgrade if possible.
I am giving that a try this afternoon.
Please inform me, if the problem still exists with the latest version of the controls.
Greetings,
Dimitar Terziev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>