ColorPicker problem

2 posts, 0 answers
  1. aditi
    aditi avatar
    26 posts
    Member since:
    Oct 2008

    Posted 05 Jun 2009 Link to this post


    I am creating textboxes dynamically in a table. I want to bind the radcolorpicker with the textbox at the time of creation programatically in code behind with a pre-color(default color) set. On clicking the textbox the radcolorpicker should open.

    Is this possible?

    Thank you.
  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 11 Jun 2009 Link to this post

    Hi aditi,
    The RadColorPickerControl does not offer the functionality you describe. What you can do is the following:
    1. Set the Text property of the TextBox to the SelectedColor of the RadColorPicker when you create the TextBox.
    2. On the client, handle the mousedown event of the TextBox and use the showPalette client method of the RadColorPicker to open the palette.
    3. Use the ClientColorChange event of the RadColorPicker to update the text of the TextBox when you select a different color.
    Please refer to our online demos for a simple example how you can use the showPalette method and the ClientColorChange event of the RadColorPicker.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top