Set selected color to 'No Color' button

5 posts, 0 answers
  1. Alexis
    Alexis avatar
    5 posts
    Member since:
    Jun 2014

    Posted 04 Aug 2014 Link to this post

    Actually, when you press the 'No Color' button, the palette sets as no color the black color.

    My question is if it's possible to set as 'No Color' the white color (#ffffff).

    Regards,

    Alexis Rosano.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Aug 2014 in reply to Alexis Link to this post

    Hi Alexis,

    Please try the below JavaScript code snippet to achieve your scenario.

    JavaScript:
    function pageLoad() {
        $('#RadColorPicker_emptycolor').click(function () {
            $('.rcpColorPreview')[0].style.backgroundColor = "white"; ;
        });
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Alexis
    Alexis avatar
    5 posts
    Member since:
    Jun 2014

    Posted 06 Aug 2014 in reply to Shinu Link to this post

    My RadcolorPicker is inside a RadPanelBar.

    When I click the 'No color' button, it always set the color #808080.

    I didn't get any error.
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Aug 2014 in reply to Alexis Link to this post

    Hi Alexis,

    Please do following modification in the JavaScript which works fine at my end.

    JavaScript:
    $('.rcpEmptyColor').click(function () {
        $('.rcpColorPreview')[0].style.backgroundColor = "white";
    });

    Thanks,
    Shinu.
  6. Misho
    Admin
    Misho avatar
    129 posts

    Posted 07 Aug 2014 Link to this post

    Hello Alexis,

    I've tried to replicate the described behavior on my side with RadColorPicker inside RadPanelBar but no avail. Here is a video showing my test:

    http://screencast.com/t/WG1hv5Xf5pf

    The issue might be related to some specific configuration of RadColorPicker control in your project.
    Could you, please, prepare a sample project isolating the issue, so that we can further investigate it and come back to you with our findings.

    You could also review the Client-side programming articles of RadColorPicker in our documentation.

    Best Regards,
    Misho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017