JimmidyJoo
JimmidyJoo

Reputation: 11341

How to Remove Apply Button in a Telerik RadColorPicker From Code Behind

I would like to remove the "Apply" button in the "RGB Sliders" tab of a RadColorPicker so that the functionality of setting a colour more closely resembles that of the "Web Palette" tab, which does not need an "Apply" button click for the colour to be set.

I would like this to be done in the code behind.

My RadColorPicker in its current form:

RadColorPicker colourPicker = new RadColorPicker();
colourPicker.ShowIcon = false;
colourPicker.AutoPostBack = true;
colourPicker.ShowEmptyColor = false;
colourPicker.PaletteModes = PaletteModes.RGBSliders;

Upvotes: 0

Views: 457

Answers (1)

Sikandar Amla
Sikandar Amla

Reputation: 1475

You can achieve this by CSS.

'Code behind
colourPicker.CssClass="noApplyButtonColorPicker" 'ADDING A CSS CLASS HERE WILL ENSURE THAT IT APPLIES ONLY TO COLOUR PICKERS WHICH YOU CHOOSE TO.

/*CSS*/
.noApplyButtonColorPicker .rcpApplyButton
{
  display:none !important;
}

This will hide your apply button.

Sikandar

Upvotes: 2

Related Questions