Search results

Hide Control Buttons in ASP.NET Core ColorPicker control

22 Oct 2021 / 1 minute to read

ColorPicker can be rendered without control buttons (Apply/Cancel). In this case, while selecting a color, the ColorPicker pop-up is closed and selected colors can be applied directly. To hide control buttons, set the showButtons property to false.

tagHelper
show-buttons.cs
Copied to clipboard
<div class='wrap'>
    <h4>Choose Color</h4>
    <ejs-colorpicker id="element" showButtons="false"></ejs-colorpicker>
</div>

<style>
    .wrap {
        margin: 0 auto;
        width: 300px;
        text-align: center;
    }
</style>
Copied to clipboard
public ActionResult ShowButtons()
    {
            return View();
    }