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.
I am using 2013.2.918 and this is working. I tried to upgrade to 2013.3.1324 and it is no longer working. Please see attached. Do you know how I can work-around this or is this a known issue?
RadDropDownList has an attribute "DropdownWidth" that controls the width of the LIST when it drops down. If you set the width to a specific number of pixels (say 200px) then there is no issue. But if you set it to "100%" then I would have expected it to be 100% of the owner controls width. But this is not the case, and it becomes very evident when the RadDropDownList is used with a template column of a RadGrid. In a RadGrid template column, this setting causes the LIST width to expand all the way to the right edge of the screen. This seems to me to be a bug, as it makes no sense to behave this way. You can see this behavior in the screenshot I have attached. It becomes more evident that this was not the intended functionality (and must be a bug) when you substitute the control with a RadComboBox, having exactly the same attributes. This will use the combo's default settings and show a dropdown list. With the RadCombBox the LIST does not expand to the far right of the screen, it behaves as expected, having 100% of the combobox width. I would expect both controls to work identically with their LISTS when setting the "DropdownWidth" attribute to "100%".
Current style
.k-reset {
margin: 0;
padding: 0;
border: 0;
background: none;
list-style: none; }
What it should be:
.k-reset {
margin: 0;
padding: 0;
border-width: 0;
outline: 0;
text-decoration: none;
font: inherit;
list-style: none
}
A workaround is to disable the embedded jQuery and use an older version (for example, 1.11.1 which is the previous version the suite used): https://docs.telerik.com/devtools/aspnet-ajax/controls/scriptmanager/disabling-the-embedded-jquery Repro steps: - Add a dropdownlist, attach server handler - select item Expected: postback Actual: error <asp:Label Text="" ID="Label1" runat="server" /> <telerik:RadDropDownList runat="server" ID="rddl1" OnSelectedIndexChanged="rddl1_SelectedIndexChanged" AutoPostBack="true"> <Items> <telerik:DropDownListItem Text="first" /> <telerik:DropDownListItem Text="second" /> <telerik:DropDownListItem Text="third" /> </Items> </telerik:RadDropDownList> protected void rddl1_SelectedIndexChanged(object sender, Telerik.Web.UI.DropDownListEventArgs e) { Label1.Text = (sender as RadDropDownList).SelectedText; }
The issue is not reproducible for RadDropDownList with RenderMode="Lightweight" .
1.Run the provided code below which focuses the RadDropDownList 2.Press the down key which is supposed to select the second item. - Item is not selected 3.Press again the down key - second item is selected. <script> function pageLoad() { $get('RadDropDownList1').focus(); } </script> <asp:TextBox ID="Textbox1" runat="server" /> <telerik:RadDropDownList ID="RadDropDownList1" runat="server" TabIndex="11"> <Items> <telerik:DropDownListItem Text="item 1" /> <telerik:DropDownListItem Text="item 2" /> </Items> </telerik:RadDropDownList>
Application Scenario: We have a large page, that we are wanting to improve the performance on. We have a few drop downs that change there available options based on the selections of another drop down. We retrieve the values of the second item though JSON and a generic handler. We generate the items for the drop down list, and then post the final values back when the user is finished. The problem we have is that the user selected item is lost between client and server click actions. I provided a sample scenario that illustrates the problem, and the basic application of this scenario. The drop down does have all the client populated items, but the item that is selected is not retained. Our temporary work around is to store the selected item in a hidden field and read from that which does keep it's value.