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

Ignore multiple class, supported?

12 Answers 273 Views
Sortable
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 02 Jul 2015, 04:25 AM

As show in this demo. Seems sortable made inline editing input box of grid disabled(But click edit button).
I did some research. The walkaround is to get grid ignore input box.
I have setup currentGrid.table.kendoSortable({ignore: ".background-color-white, input"} which seems work.
Can anyone from Kendo team confirm this is the right way to ignore multiple class?

12 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 02 Jul 2015, 11:04 PM

Sry. Forgot the demo link.
http://plnkr.co/xGqJenNDzyKjcmdF1Edm

0
Alexander Valchev
Telerik team
answered on 03 Jul 2015, 03:30 PM
Hello Peter,

Yes this is the right syntax. The ignore configuration option accepts string representation of CSS selector.

ignore: ".background-color-white, input" is valid syntax.


Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Peter
Top achievements
Rank 1
answered on 22 Jul 2015, 12:40 AM

Hi. Alex. I need help to disable sortable in ​dynamically.
Here is the demo http://plnkr.co/w44pS20LB0K1EpxPIq1i.
I want if user click the edit button in 'Health and Physical Education' row.
In script.js line 1130,
disable sortable for background color green grid and background color blue sub grid(if exists).
Is there a way to do it? Thx again.

0
Peter
Top achievements
Rank 1
answered on 22 Jul 2015, 01:42 AM
Hi. Alex. I figured it out.
There is a disabled method in sortable which is what i end up use.
Thx any way.
0
Peter
Top achievements
Rank 1
answered on 26 Jul 2015, 11:31 PM

Hi. Alex. Another small issue. Pls check this demo http://plnkr.co/w44pS20LB0K1EpxPIq1i.
If you try to sort 'Health and Physical Education', the clone row function of ​sortable made button and input box to be separate row.
It is only happen when i mix bootstrap ​class with kendo.
​If i take out line 11 in index.html which is reference to bootstrap, clone row function seems works fine (button and input box ​are in the ​one row).
Any ideas? Thx.

0
Alexander Valchev
Telerik team
answered on 28 Jul 2015, 04:13 PM
Hello Peter,

The hint element is appended to the <body> tag. This may cause styling issues if the CSS rules are applied only to the Sortable's container. This is written in the documentation.

On a side note I would like to ask you to open separate support threads for different issues that you encounter with. In this way it is much easier to concentrate over the concrete problem which usually leads to its faster resolving.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Peter
Top achievements
Rank 1
answered on 29 Jul 2015, 01:48 AM
Thank you to put me in the right track again!!
0
Peter
Top achievements
Rank 1
answered on 14 Sep 2015, 06:02 AM

Hi. Alex. This time i got wired problem with ignore options, it does not ignore child grid's input for some reason. As i replicated in http://plnkr.co/HN2V1nkJBHyEepC5HwaK.

When i click edit button of parent grid eg:'Speaking And Listeningssssfsss'. It ignore input box of parent grid without issue.
But when i click edit button of child grid eg: child grid name 'Listens to discussions, clarifying...dsss' under 'Speaking And Listeningssssfsss'. It does not ignore input box, so i can not type anything inside child grid.
Any ideas. Thx in advance.

0
Alexander Valchev
Telerik team
answered on 16 Sep 2015, 06:59 AM
Hi Peter,

Most probably the issue is connected with an incorrect selector. Please check the HTML structure and respective selectors.

I would like to remind you that it is recommended to ask different questions in separate supports threads. In this way is it easier to concentrate on the concrete subject which usually leads to its faster resolving. In case you need further assistance please open a new support thread and we will do our best to help.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Peter
Top achievements
Rank 1
answered on 17 Sep 2015, 12:15 AM

Thx Alex. I ​think my question is related with this thread.
Because even ignore option is supported multiple class seems not working for my example.
I have spent some time to set up that demo page, can you at least tell me what is wrong with selector?

0
Alexander Valchev
Telerik team
answered on 18 Sep 2015, 07:52 AM
Hi Peter,

I checked the example that you prepared.

I have put a console.log in the sortGrid function to verify if the 'ignore' selector is correct:
837: console.log("sort grid", currentGrid.table[0], "ignore: ", $(ignore).length);

The output can be seen in the attached screen shot. It is obvious that the ignore selector for child grids does not match any elements.

I also tested the selector after the whole page was loaded and it did not match any elements either. Are you sure that you want to ignore elements with class input or just input elements? Maybe a selector without starting dot will work?

dataBound: function(e) {
  var currentGrid = e.sender;
  var currentReportTableItemGridId = currentGrid.tbody.closest('.k-grid').attr('id');
  var ignore = ".input"; //vs "input" ?
  sortGrid(currentGrid, ">tbody >tr", "#" + currentReportTableItemGridId + " tbody", ignore, "#" + currentReportTableItemGridId, vm._FSM_MoveRTI);
  setGridStyle(currentGrid);
},


Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Peter
Top achievements
Rank 1
answered on 21 Sep 2015, 02:11 AM

Spot on. My silly mistake!
Thx again. Alex. You are very helpful.

Tags
Sortable
Asked by
Peter
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Alexander Valchev
Telerik team
Share this question
or