Greeting,
I am having an issue using the multi select inside a gird cell. I have the <select> control being generated inside a kendo.template and am binding the class of that <select> to the multi select on the dataBound event of the grid.
The is initially empty and gets populated base on a choice from a list view. When the grid is populated, everything shows up fine. BUT, when i click inside the multi select it looses its kendo...ness and reverts to an html multi select. I have noticed that there is a very small area that I can click (right next to an already selected item or at the very end) but other than that it will loose it.
I wasn't sure if this was a bug or how I was creating it.
Thanks in advance.
GRID:
I am having an issue using the multi select inside a gird cell. I have the <select> control being generated inside a kendo.template and am binding the class of that <select> to the multi select on the dataBound event of the grid.
The is initially empty and gets populated base on a choice from a list view. When the grid is populated, everything shows up fine. BUT, when i click inside the multi select it looses its kendo...ness and reverts to an html multi select. I have noticed that there is a very small area that I can click (right next to an already selected item or at the very end) but other than that it will loose it.
I wasn't sure if this was a bug or how I was creating it.
Thanks in advance.
GRID:
$("#grid").kendoGrid({
dataSource: gridDS,
toolbar: ["save", "cancel"],
columns: [
{ field: "Commodity", title: "Commodity" },
{ field: "Description", title: "Description" },
{ field: "Price", title: "Price", format: "{0:c}" },
{ field: "NoteObj", title: "Note", template: kendo.template($("#tempNote").html()) },
{ field: "QuoteBy", title: "Last Quoted By" },
{ field: "QuoteDate", title: "Date", format: "{0:MM/dd/yy}" }
],
editable: true,
navigatable: true,
pageable: true,
update: true,d
change: detailInit,
selectable: true,
dataBound: function (e) {
$('#grid').data('kendoGrid').tbody.find('#noteS').kendoMultiSelect();
}
});
TEMPLATE:
<script type="text/x-kendo-tmpl" id="tempNote">
#=ParseNote(NoteObj)#
</script>
FUNCTION:
function ParseNote(d) {
var a = d.split(',');
var builder = "<input id='noteS' multiple='multiple'>";
console.log(builder);
for (var i = 0; i < a.length; i++) {
if (a[i] !== "") {
if (a[i] == " True") {
builder += "<option selected>" + a[i] + "</option>";
} else {
builder += "<option>" + a[i] + "</option>";
}
}
}
builder += "</select>";
console.log(builder);
return builder;
};
dataSource: gridDS,
toolbar: ["save", "cancel"],
columns: [
{ field: "Commodity", title: "Commodity" },
{ field: "Description", title: "Description" },
{ field: "Price", title: "Price", format: "{0:c}" },
{ field: "NoteObj", title: "Note", template: kendo.template($("#tempNote").html()) },
{ field: "QuoteBy", title: "Last Quoted By" },
{ field: "QuoteDate", title: "Date", format: "{0:MM/dd/yy}" }
],
editable: true,
navigatable: true,
pageable: true,
update: true,d
change: detailInit,
selectable: true,
dataBound: function (e) {
$('#grid').data('kendoGrid').tbody.find('#noteS').kendoMultiSelect();
}
});
TEMPLATE:
<script type="text/x-kendo-tmpl" id="tempNote">
#=ParseNote(NoteObj)#
</script>
FUNCTION:
function ParseNote(d) {
var a = d.split(',');
var builder = "<input id='noteS' multiple='multiple'>";
console.log(builder);
for (var i = 0; i < a.length; i++) {
if (a[i] !== "") {
if (a[i] == " True") {
builder += "<option selected>" + a[i] + "</option>";
} else {
builder += "<option>" + a[i] + "</option>";
}
}
}
builder += "</select>";
console.log(builder);
return builder;
};