[英]Kendo color picker in a jQuery popup dialog box
I'm using the jQuery popup dialog box and have placed a Kendo colorpicker inside. 我正在使用jQuery弹出对话框,并在其中放置了Kendo颜色选择器。 The color picker works and is editable however the text input is not selectable or editable. 颜色选择器可以工作并且可以编辑,但是文本输入不能选择或编辑。 This means I cannot allow users to edit the hex value meaning they can only choose using the color wheel. 这意味着我不能允许用户编辑十六进制值,这意味着他们只能使用色轮进行选择。
Any ideas? 有任何想法吗?
@model string
@{
var currentColor = "FFFFFF";
if(Model != null){
currentColor = Model;
}
}
@(Html.Kendo().ColorPicker()
.Name(ViewData.TemplateInfo.GetFullHtmlFieldName(""))
.Value(currentColor)
.Buttons(true)
.HtmlAttributes(new {
id=ViewData.TemplateInfo.GetFullHtmlFieldId("")
})
)
declare the fields in the model as editable. 将模型中的字段声明为可编辑。
dataSource = new kendo.data.DataSource({
transport: {
read: {
url: crudServiceBaseUrl + "/Products",
dataType: "json"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
}
},
batch: true,
pageSize: 20,
schema: {
model: {
id: "ColorId",
fields: {
field1: { editable: false },
field2: { editable: false },
Color: { editable: true },
}
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.