This is a migrated thread and some comments may be shown as answers.

Can a sortable list ignore multiple elements?

1 Answer 222 Views
Sortable
This is a migrated thread and some comments may be shown as answers.
Allan
Top achievements
Rank 1
Allan asked on 17 Apr 2018, 10:00 AM

Hello, when using a sortaable list is it possible to ignore more than one type of input?  Here is my code:

@(Html.Kendo().Sortable()
    .For("#Termset")
    .ConnectWith("#AnotherWindow")                  
    .Ignore("input")
    .PlaceholderHandler("placeholder")
    .Cursor("url('" + Url.Content("~/content/web/sortable/grabbing.cur") + "'), default")
)

As you can see I have defined "ignore" to pass over input fields so that the user can still enter data, I have other elements though which I need it to ignore.  Can you define multiple elements for the sortable list to ignore?

 

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 19 Apr 2018, 06:43 AM
Hi, Frank,

The Kendo UI Sortable widget "Ignore()" option accepts a single jQuery selector. 

So to ignore multiple items, it is best to add a class to them all and use that as the selector.

.Ignore(".non-sortable")
 
Let me know if you need further information.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Sortable
Asked by
Allan
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or