New to Telerik UI for ASP.NET Core? Download free 30-day trial

Views

The Views() configuration allows you to choose between the Gradient and Palette views. Also, you can specify the initially selected view through the View() option.

The Views() configuration was introduced with the R3 2021 SP1 release.

The following example shows how to enable the available ColorPicker views and define a default view that will be displayed when the component opens.

    @(Html.Kendo().ColorPicker()
        .Name("PatetteColorPicker")
        .Preview(false)
        .View(ColorPickerView.Palette)
        .Views(new string[]{ "gradient", "palette" })
    )

    @(Html.Kendo().ColorPicker()
        .Name("GradientColorPicker")
        .Preview(false)
        .View(ColorPickerView.Gradient)
        .Views(new string[]{ "gradient", "palette" })
    )
@{
    string[] viewsList = new string[] { "gradient", "palette" };
}

<kendo-colorpicker name="PatetteColorPicker" preview="false" view="palette" views="viewsList">
</kendo-colorpicker>

<kendo-colorpicker name="GradientColorPicker" preview="false" view="gradient" views="viewsList">
</kendo-colorpicker>

See Also

In this article