I have a grid
@(Html.Kendo().Grid<TaskViewModel>()
.Name("taskGrid")
.Deferred()
...
.Columns(columns =>
{
columns.Bound(e => e.CrmWorkflowStatusText).Title("WF Status").Filterable(x
=> x.UI("SomeFunction")
.Extra(false)
.Operators(k => k
.ForString(str => str.Clear()
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal
to")
)));
})
...
.DataSource(dataSource => dataSource
...
))
that has a dropdownlist to filter one of the columns
function SomeFunction(element) {
const checkBoxTemplate = '@(Html.Kendo().CheckBox().Name("#:Title#").HtmlAttributes(new { @class = "checkbox", onchange = "SomeOtherFunction(this)" }))';
element.kendoDropDownList({
dataSource: {
transport: {
read: "@Url.Action("SomeAction")"
}},
optionLabel: "Select Something",
dataTextField: "Title",
dataValueField: "Title",
open: adjustDropDownWidth,
template: "<span><label>" + checkBoxTemplate + "<span id='#= Title #'>#= Title #</span></label></span>"
});
}
My problem is setting the id of this dropdownlist. I tried
name: "somename"
and
htmlAttributes: { id: "somename" }
hmtlAttributes does nothing and name:
"somename" sets the data-role attribute to "somename"...
<input title="Value" style="display: none;" type="text" data-role="test123" data-bind="value:filters[0].value">
Is there a way to fix this?