How can i get the text field of a dropdown in the column filter?
I have the following example : https://dojo.telerik.com/izUviSID/2
Dear Admin,
I am developing the list which can drag and drop in "list to list" and "item to item". But there are some bug, can you suggest anyway to overcome it. I write a example in the following. Thanks.
https://dojo.telerik.com/@eltiel/uZAWoYiy
Regards,
Simon
Hi all,
I have a listView with the following bindings:
listView.bind(
"remove"
,
function
(e) {
$.ajax({
type :
"POST"
,
url : vulnerabilityAssessment.deleteVulnerabilityAssessmentItem.replace(
"{itemId}"
, e.model.id),
contentType :
'application/json'
,
dataType :
"json"
,
success :
function
(response) {
refreshCurrentListView(listViewId, scope);
},
});
}
listView.bind(
"save"
,
function
(e) {
var
item = {
id: ...,
vulnerabilityAssessment: vulnerabilityAssessmentId,
.....
}
if
(e.model.id ==
null
)
item.id = -1;
$.ajax({
type :
"POST"
,
url : vulnerabilityAssessment.saveVulnerabilityAssessmentItem,
contentType :
'application/json'
,
data : JSON.stringify(item),
complete :
function
(e) {
refreshCurrentListView(listViewId, scope);
},
error :
function
(e) {
showErrorDialog(e);
},
dataType :
"json"
});
});
And the refreshCurrentListView function as follows:
function
refreshCurrentListView(listViewId, scope) {
var
type = parseInt(listViewId.substr(listViewId.indexOf(
"_"
) + 1));
var
vulnerabilityAssessmentId = $(
"#vulnerabilityCurrentAssessmentListView"
, scope).children(
'div'
).children(
'div'
)[0].id.substr($(
"#vulnerabilityCurrentAssessmentListView"
, scope).children(
'div'
).children(
'div'
)[0].id.indexOf(
"_"
) + 1);
if
(listViewId.includes(
"Strenght"
)) {
var
itemViewModel = itemViewStrength(vulnerabilityAssessmentId, type,
'S'
);
kendo.bind ($(
"#threatCurrentVulnerabilityAssessment #"
+ listViewId, scope), itemViewModel);
$(
"#threatStrenghtListView_"
+ type +
" .edit-buttons"
).show();
}
}
I'm adding a new record on the list and as soon as I add a second row , I get the following exception:
Uncaught TypeError: Cannot read property
'data'
of undefined
at init.setup (kendo.all.min.js:27)
at init.create (kendo.all.min.js:27)
at Object.<anonymous> (kendo.all.min.js:27)
at Function.Deferred (jquery.min.js:2)
at init._promise (kendo.all.min.js:27)
at init._send (kendo.all.min.js:27)
at init.sync (kendo.all.min.js:27)
at init.save (kendo.all.min.js:54)
at HTMLAnchorElement.<anonymous> (kendo.all.min.js:54)
at HTMLDivElement.dispatch (jquery.min.js:3)
This exception happens when the ajax call inside the 'save' binding takes place (and before it gets to the complete function).
Any ideas?
I am trying to create a kendo custom widget in typescript, but the data function always returns null.
let emptyWidget = $(
'#emptyCriteria'
).kendoEmptyTemplate().data(
'kendoEmptyTemplate'
);
console.log(emptyWidget)
// getting always undefined
Widget Code:
interface JQuery {
kendoEmptyTemplate(options?: KendoWidgets.IEmptyTemplateOptions): JQuery;
data(key:
"kendoEmptyTemplate"
): KendoWidgets.EmptyTemplateOptions;
}
module KendoWidgets {
export interface IEmptyTemplateOptions {
}
export class EmptyTemplateOptions implements IEmptyTemplateOptions{
name: string =
'EmptyTemplate'
;
}
export class EmptyTemplate extends kendo.ui.Widget
{
options: EmptyTemplateOptions;
constructor(element: Element, options: IEmptyTemplateOptions) {
super
(element, options);
}
}
// Create an alias of the prototype (required by kendo.ui.plugin)
EmptyTemplate.fn = EmptyTemplate.prototype;
// Deep clone the widget default options
EmptyTemplate.fn.options =
new
EmptyTemplateOptions();
// Create a jQuery plugin.
kendo.ui.plugin(EmptyTemplate);
}
Html:
<
div
id
=
"emptyCriteria"
></
div
>
Any of you have encountered this issue or am I missing any methods in widget?
Hi,
I have a kendo grid with few locked columns and multiple other columns. When I do navigate grid from other page it's working fine but not when refresh page using using F5 or reload option. Seems width is not set properly, please review atttached snapshots.
I made a simple TreeList.
The data from the server is simple JSON array.
[{"Description":"111","id":1,"Name":"CEO"},{"Description":"222","id":2,"parentId":1,"Name":"Jane"},{"Description":"333","id":3,"Name":"Tom"},{"Description":"444","id":4,"Name":"Susan"}]
TreeList java script code is below but this always display "No records to display"
When I remove "model" object under "schema" in DataSource It works well.
I don't know what is the problem.
Please help me to solve this proble.
var dataSource = new kendo.data.TreeListDataSource({
transport : {
read : {
url: "ReadAsset",
dataType: "json"
}
},
schema: {
model: {
id: "id",
parentId: "parentId",
expanded: true
}
}
});
$("#treelist").kendoTreeList({
dataSource: dataSource,
height: "99%",
columns: [
{ field: "Name" },
{ field: "Description" }
]
});
rootNode = myTreeView.append({ text:
"MyRoot"
},
null
);
subNode = myTreeView.append({ text:
"MySubNode"
}, rootNode);
myTreeView.append({ text:
"MyThirdLevelNode1"
}, subNode);
myTreeView.append({ text:
"MyThirdLevelNode2"
}, subNode);
MyMenu.append(
'<li id="RootMenuItem" class="k-item">MyRootItem</li>'
);
MyMenu.append(
'<li id="MySubItem" class="k-item">SubItem</li>'
, $(
"#RootMenuItem"
));