Approved
Last Updated: 12 Feb 2014 16:34 by Aarsh
ADMIN
Danail Vasilev
Created on: 12 Feb 2014 15:37
Category: FormDecorator
Type: Bug Report
1
FIX empty options from decorated selects by RadFormDecorator in Lightweight mode do not have arrow
Issue is reproducible with the following markup:

ASPX:

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" RenderMode="Lightweight" />

        <select>
            <option>option 1</option>
            <option selected="selected"></option>
        </select>


For the time being the following JavaScript workaround can be placed below the RadFormDecorators' declaration:

        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" RenderMode="Lightweight" />
        <script>
            Telerik.Web.UI.FormDecorator.LightWeightDomDecorator.prototype.setSelectHeaderText = function (decoratedSelectHeader, text, isDropDown) {
                if (isDropDown) {
                    decoratedSelectHeader.innerHTML = "";
                    var span = this._createArrowSpan();
                    decoratedSelectHeader.appendChild(span);
                    decoratedSelectHeader.appendChild(document.createTextNode(text));
                } else {
                    var innerElement = $telerik.getElementByClassName(decoratedSelectHeader, "rfdSelectText");
                    if (text) text = text.replace(/</g, "&lt;");
                    if (innerElement) innerElement.innerHTML = text;
                }
            }
        </script>
1 comment
Aarsh
Posted on: 12 Feb 2014 16:34
Thank you !