简体   繁体   中英

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;

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM