Hi! I try to use ColorPickerFor in my custom kendo grid editor popup, in this way:
<
table
style
=
"width: 100%"
class
=
"detail-table detail-table-wider-first-column"
>
<
tr
>
<
td
>@Html.Label("Kolor:")</
td
>
<
td
>
<
div
>
@(Html.Kendo().ColorPickerFor(m => m.Color).HtmlAttributes(new { data_value_primitive = "true" }).Events(e => e.Close("colorpicker_select")).ClearButton(true))
</
div
>
</
td
>
</
tr
>
</
table
>
Color's type is string.
I would like to set my color in default as null (or empty string). Furthermore I would like to allow reseting previous value (some color) to null again. I added clearButton, but it was insufficient.
I tried to add some jquery function on onClose event:
function colorpicker_select(e) {
$("#Color").val($(".k-color-value").val()).change();
}
But it wasn't worked. I thought that data_value_primitive is necessary, but it wasn't worked too.
Can I get some help?