Hi Telerik team,
Using DropDownList with 4 items, setting visibility of the third one to false (either directly in apsx definition or setting it at page load event), display is OK, but when selecting the fourth and submitting the changes, server see the third one selected.
Attached is a project reproducing ths issue.
Hi Mathieu,
Thank you for reporting this issue! I verified the bug report and set its status to Unplanned.
Until the problem gets fixed, you can use one of the following solutions:
<style>
.hiddenItem { display: none; }
</style>
<telerik:RadDropDownList runat="server" ID="ddl_example" Width="95%">
<Items>
<telerik:DropDownListItem Text="-" Value="-1" />
<telerik:DropDownListItem Text="Item 1" Value="1" />
<telerik:DropDownListItem Text="Item 2" Value="2" />
<telerik:DropDownListItem CssClass="hiddenItem" Text="Item 3" Value="3"/>
<telerik:DropDownListItem Text="Item 4" Value="4" />
</Items>
</telerik:RadDropDownList>
<telerik:RadComboBox runat="server" ID="ddl_example" Width="95%">
<Items>
<telerik:RadComboBoxItem Text="-" Value="-1" />
<telerik:RadComboBoxItem Text="Item 1" Value="1" />
<telerik:RadComboBoxItem Text="Item 2" Value="2" />
<telerik:RadComboBoxItem Visible="false" Text="Item 3" Value="3"/>
<telerik:RadComboBoxItem Text="Item 4" Value="4" />
</Items>
</telerik:RadComboBox>
As a small token of gratitude for reporting the issue, I updated your Telerik points.
Regards,
Rumen
Progress Telerik