TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
albert albert
NA
524
0
How to drop/drag item
Jul 3 2014 7:40 AM
Hi everybody,
I have this:
[code]
$(document).ready(function()
{
var grid = $("#medicijnenGridVolgorde").data('kendoGrid');
var dataSource = grid.dataSource;
grid.table.kendoDraggable({
filter: "tbody > tr",
group: "gridGroup",
hint: function (e) {
return $('<div class="k-grid k-widget"><table><tbody><tr>' + e.html() + '</tr></tbody></table></div>');
}
});
grid.table/*.find("tbody > tr")*/.kendoDropTarget({
group: "gridGroup",
drop: function (e) {
var target = dataSource.get($(e.draggable.currentTarget).data("id")),
dest = $(e.target);
if (dest.is("th")) {
return;
}
dest = dataSource.get(dest.parent().data("id"));
//not on same item
if (target.get("Id") !== dest.get("id")) {
//reorder the items
var tmp = target.get("Volgorde");
target.set("Volgorde", dest.get("Volgorde"));
dest.set("Volgorde", tmp);
dataSource.sort({ field: "Volgorde", dir: "asc" });
}
}
});
});
[code]
but the target: if (target.get("Id") !== dest.get("id")) {
is the same. So the drop/drag doesnt work.
Reply
Answers (
0
)
how to use ajax call in jquery
Reg:JQUERY