Pending Review
Last Updated: 15 Sep 2015 08:13 by ADMIN
ADMIN
Ianko
Created on: 15 Sep 2015 08:11
Category: UI for ASP.NET AJAX
Type: Feature Request
0
Improve CustomColor button to update the CustomColorPallete according to the currently selected color
Currently, opening the CustomColorPallete popup always selects the #808080 color.


To have this behavior with the current implementation of RadColorPicker, you can use this custom code:


<telerik:RadColorPicker runat="server" ID="RCP" EnableCustomColor="true" OnClientLoad="OnClientLoad" />

<script>
    function OnClientLoad(sender, args) {
        $telerik.$(sender._customColorButton).click(refreshPalette(sender));
    }

    function refreshPalette(sender) {
        return function (evt) {
            var colorPicker = sender;
            var selectedColor = colorPicker.get_selectedColor() || "#808080";
            colorPicker._updateHslPaletteElementsUI(colorPicker._getRgbFromHex(selectedColor), null, true);
        };
    }
</script>
0 comments