This issue is what we are experiencing
http://www.telerik.com/support/pits.aspx#/details/Issue=2147
Thanks
Eric
3 Answers, 1 is accepted
I have inspect eh the scenario you described but could not observe the unusual behavior. Would you please share the exact code that you use that works fine with Q3 2012 and does not work with Q1 2013 so we could inspect it and be more helpful?
Plamen
the Telerik team
Hi Plamen, Here is the code that we are using. The error is raised at this line "if (int.Parse(rcbStageId.SelectedValue) == 4. For some reason the first record added to rcbStageId isn't set as the selectedValue.
Thanks for your help
<
telerik:RadComboBox
ID
=
"rcbStageId"
runat
=
"server"
MarkFirstMatch
=
"True"
Width
=
"135px"
MaxHeight
=
"200px"
AutoPostBack
=
"True"
meta:resourcekey
=
"rcbStageIdResource1"
onselectedindexchanged
=
"rcbStageId_SelectedIndexChanged"
>
<
CollapseAnimation
Type
=
"OutQuint"
Duration
=
"200"
></
CollapseAnimation
>
</
telerik:RadComboBox
>
protected void Rebind_rcbStageId()
{
P3StageCollection items = new P3StageCollection();
// items to fetch is the total number of items displayed currently, plus
// the amount requested each fetch
IPredicateExpression filter = new PredicateExpression();
ISortExpression sorter = new SD.LLBLGen.Pro.ORMSupportClasses.SortExpression();
if (LanguageSelected == BaseLanguage.LanguageType.English)
sorter.Add(P3StageFields.DescEn | SortOperator.Ascending);
else
sorter.Add(P3StageFields.DescFr | SortOperator.Ascending);
IRelationCollection relations = new RelationCollection();
items.GetMulti(filter, 1000, sorter, relations);
string value = rcbStageId.SelectedValue;
rcbStageId.Items.Clear();
if (P3ProjectFields.StageId.IsNullable)
{
RadComboBoxItem rcbItem = new RadComboBoxItem("", "");
rcbStageId.Items.Add(rcbItem);
}
foreach (P3StageEntity item in items)
{
if (LanguageSelected == BaseLanguage.LanguageType.English)
{
RadComboBoxItem rcbItem = new RadComboBoxItem(item.DescEn.ToString(), item.StageId.ToString());
rcbStageId.Items.Add(rcbItem);
}
else
{
RadComboBoxItem rcbItem = new RadComboBoxItem(item.DescFr.ToString(), item.StageId.ToString());
rcbStageId.Items.Add(rcbItem);
}
}
if (value != "")
{
rcbStageId.SelectedValue = value;
}
if (int.Parse(rcbStageId.SelectedValue) == 4)
{
dtActualEndDate.Enabled = true;
lbl_dtActualEndDate.Enabled = true;
}
}
Thank you for contacting us again and providing the code used.
I have isolated the issue to a sample web page with only a RadComboBox and a Button which is adding an item in it. Unfortunately could not observe any difference in the behavior between the two versions of RadControls.
I am attaching my sample test project. Please review it and let me know if I have to add something else to be able to observe the described issue and be able to help you.
Plamen
the Telerik team