Ignore multiple class, supported?

13 posts, 0 answers
  1. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 01 Jul 2015 Link to this post

    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?

  2. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 02 Jul 2015 in reply to Peter Link to this post

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

  3. Kendo UI is VS 2017 Ready
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 03 Jul 2015 Link to this post

    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!
     
  5. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 21 Jul 2015 in reply to Alexander Valchev Link to this post

    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.

  6. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 21 Jul 2015 in reply to Alexander Valchev Link to this post

    Hi. Alex. I figured it out.
    There is a disabled method in sortable which is what i end up use.
    Thx any way.
  7. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 26 Jul 2015 in reply to Alexander Valchev Link to this post

    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.

  8. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 28 Jul 2015 Link to this post

    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!
     
  9. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 28 Jul 2015 in reply to Alexander Valchev Link to this post

    Thank you to put me in the right track again!!
  10. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 14 Sep 2015 in reply to Alexander Valchev Link to this post

    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.

  11. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 16 Sep 2015 Link to this post

    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!
     
  12. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 16 Sep 2015 in reply to Alexander Valchev Link to this post

    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?

  13. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 18 Sep 2015 Link to this post

    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!
     
  14. Peter
    Peter avatar
    39 posts
    Member since:
    May 2015

    Posted 20 Sep 2015 in reply to Alexander Valchev Link to this post

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

Back to Top
Kendo UI is VS 2017 Ready