This is a migrated thread and some comments may be shown as answers.

ColorPicker problem

1 Answer 61 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
aditi
Top achievements
Rank 1
aditi asked on 05 Jun 2009, 06:46 PM
Hi,

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.

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 11 Jun 2009, 07:54 AM
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.

Greetings,
Tsvetie
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.
Tags
ColorPicker
Asked by
aditi
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or