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

Sortable Filter with multiple JQuery Selector

2 Answers 111 Views
Sortable
This is a migrated thread and some comments may be shown as answers.
Minh
Top achievements
Rank 1
Minh asked on 31 Oct 2014, 04:23 PM
Hi, 

I am setting up a Kendo sortable with a grid.

@(Html.Kendo().Sortable()
            .For("#MyGrid")
            .Filter(".sortable, table > tbody > tr:not(.k-grid-edit-row)")            
            .Disabled(".disabledDragSort")
            .Cursor("move")
            .HintHandler("ConfigureHint")
            .PlaceholderHandler("placeholder")
            .ContainerSelector("#MyGrid tbody")
            .Events(events => events.Start("onStart").Change("onChange"))
 )

When I set the filter as above it does not work. I am trying to filter for two separate jQuery selectors, separated by a comma. It does not work. When I remove one or the other, for example: .Filter(".sortable"), it works.  What can I do to get this working?






2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 04 Nov 2014, 10:10 AM
Hi Minh,

You should be able to use multiple selectors separated by coma. Please see the following example: http://dojo.telerik.com/UnOW

In fact any valid CSS selector can be used and your selector looks valid. I assume that the problem is related to the mark-up of your page. Where are the .sortable elements located? Are they inside the #MyGrid element?

Regards,
Alexander Valchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Minh
Top achievements
Rank 1
answered on 07 Nov 2014, 06:40 PM
Yes, the .sortable elements are inside the #MyGrid element. I will look at rebuilding the mark-up of the page based on the example you provided. Thanks very much.
Tags
Sortable
Asked by
Minh
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Minh
Top achievements
Rank 1
Share this question
or