Kendo.Mvc.UI.Fluent.ColorPaletteBuilder

Defines the fluent API for configuring the Kendo UI ColorPalette

Methods

TileSize(System.Double)

Sets the size of the palette tiles

Parameters

tileSize System.Double

The tile size (for square tiles)

Example (ASPX)

<%= Html.Kendo().ColorPalette()
    .Name("ColorPalette")
    .TileSize(32)
%>

Palette(System.String[])

Sets the range of colors that the user can pick from.

Parameters

palette System.String[]

A list of colors.

Example (ASPX)

<%= Html.Kendo().ColorPalette()
    .Name("ColorPalette")
    .Palette(new List<string> { "#ff0000", "#00ff00", "#0000ff" })
%>

Palette(Kendo.Mvc.UI.ColorPickerPalette)

Sets the range of colors that the user can pick from.

Parameters

palette Kendo.Mvc.UI.ColorPickerPalette

One of the preset palettes of colors

Example (ASPX)

<%= Html.Kendo().ColorPalette()
    .Name("ColorPalette")
    .Palette(ColorPickerPalette.WebSafe)
%>

Columns(System.Int32)

The number of columns to display. When you use the "websafe" palette, this will automatically default to 18.

Parameters

value System.Int32

The value for Columns

TileSize(System.Action<Kendo.Mvc.UI.Fluent.ColorPaletteTileSizeSettingsBuilder>)

The size of a color cell.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ColorPaletteTileSizeSettingsBuilder>

The configurator for the tilesize setting.

Value(System.String)

Specifies the initially selected color.

Parameters

value System.String

The value for Value

Events(System.Action<Kendo.Mvc.UI.Fluent.ColorPaletteEventBuilder>)

Configures the client-side events.

Parameters

configurator System.Action<Kendo.Mvc.UI.Fluent.ColorPaletteEventBuilder>

The client events action.

Example (ASPX)

@(Html.Kendo().ColorPalette()
    .Name("ColorPalette")
    .Events(events => events
        .Change("onChange")
    )
)
In this article
Not finding the help you need?