JqueryUI draggable on a sortable and also over another element - draggable

I'm not able to define a draggable element inside a sortable to be moved inside the same sortable list and also out from the sortable to another element
Thanks for your help

Related

How to add an action to kendo ui combobox

I'm trying to add a button, like the k-select element, to the end of a Kendo combobox for adding new items but whatever i change the element the result is not consistent and fine with other elements.
kendo combobox generate this style for button to open the list.select
I want to find clear way to add an button to end of combobox like this link.
the template won't help becase it in control in in list.
tnx

How do I assign a data-attribute to each <td> element in a kendo grid?

Since kendo doesn't have cell-templating per se, I've decided to add a data attribute to each cell inside a kendo grid.
I need a "data-column" attribute to each element inside a kendo grid, so that each of them can be uniquely identified with columns.field name.
Is there an out of the box way to go about doing this?
I found a solution and it's out-of-the-box. Use columns.attributes object to set DOM attributes to each TD.

How to get item list from kendo ui sortable

I want to get sorted list items from bind object using kendo ui sortable listview. please refer the sample code from below.
http://dojo.telerik.com/#lilan123/eWofa/2
One way would be to use the Kendo event that is fired on the move or change of the sortable list to set the new index value of the item in the ng-repeat that was moved.
You set the event in the "k-on-change".
<ol id="sortable" kendo-sortable k-options="sortableOptions" k-on-change="change(kendoEvent)">
Then you add the event to the scope.
$scope.change = function(e) {
console.log(e);
alert("The e object has stuff like the old index:" + e.oldIndex);
//Get the correct item from the bound list based on index and change the index values in the list to match.
}
It seems like a hack, but then again, it always felt like a hack when using Telerik controls.
Here is a good blog post on using the events with angular, and what they claim are best practices. Hope it helps!

dragging from a sortable list to a drag and drop plugin

I am trying to allow dragging from a sortable list to a dynatree.
My initial though was to specify something like this:
$('#ews_pgs_clpbrd_items').sortable({
connectToDynatree: true
}).disableSelection();
dynatree does not register the drag and drop events for the sortable items. so I tried
$("#ews_pgs_clpbrd_items").sortable().disableSelection();
$("#ews_pgs_clpbrd_items li").draggable({
connectToDynatree: true,
connectToSortable: "#ews_pgs_clpbrd_items"
});
This allows the items in the sortable list to be dragged to the dynatree but it no longer allows sorting. When I try to sort I get the following error.
Cannot read property 'options' of undefined
This appears to just be a limitation on sortable since http://jsfiddle.net/7TTSG/3/ it happens even without dynatree.
Is there a way to pass the drag and drop option "connectToDynatree: true" in the sortable or a way to make drag and drop not break sortable?

How to delete multiple records in grid using kendoui

I am having a grid with checkboxes for each item in the grid. I need to delete the multiple checked items in the grid. How can i do that in kendo ui.
Regards,
Sri
When the button is clicked use jQuery to find all TR elements which contain the checked checkboxes and then use the removeRow method. Something like:
$.each($('#GridName :checkbox:checked').closest('tr'),function(){
$('#GridName').data().kendoGrid.removeRow($(this));
})

Resources