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
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:
Set the Text property of the TextBox to the SelectedColor of the RadColorPicker when you create the TextBox.
On the client, handle the mousedown event of the TextBox and use the showPalette client method of the RadColorPicker to open the palette.
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.