allowCopy doesn't work when it should

11 posts, 0 answers
  1. Peter
    Peter avatar
    58 posts
    Member since:
    Jan 2014

    Posted 15 Mar 2017 Link to this post

    Hi according to this doco, the grid should be copyable (as per allowCopy field) when "set to true and selection of the Grid is enabled"

    http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-allowCopy

    But in your own Dojo, meant to illustrate the feature, it doesn't work (try copying a cell and check your clipboard):

    http://dojo.telerik.com/acedo

    I can get it to work, however, if I set the selectable property to just 'row', but 'multiple,row' stops it working.

    I think there's a bunch of combination that don't work and some that do.

    Do you acknowledge this as a bug, or does the documentation need to be clearer.

     

  2. Preslav
    Admin
    Preslav avatar
    591 posts

    Posted 17 Mar 2017 Link to this post

    Hi Peter,

    Thank you for pointing this. Unfortunately, I was not able to reproduce the issue.

    During my investigation, I tested the scenario in the provided Dojo with the all of the string values of the selectable configuration outlined in our documentation.

    http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-selectable

    Further, during my tests, I recorded a video - https://www.screencast.com/t/wpiZKyjKwK.

    Please, check the above video and let me know what I am doing wrong. This information will help me understand and isolate the issue.

    I look forward to hearing from you.


    Regards,
    Preslav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Peter
    Peter avatar
    58 posts
    Member since:
    Jan 2014

    Posted 19 Mar 2017 in reply to Preslav Link to this post

    Hi Preslav,

    These kendo dojo don't seem to have a way to share or get the URL - quite frustrating. My mind boggles that this is not obvious to someone. You never need to share links to Dojo's?

    The codein the dojo looks like below. And in the latest version of Chrome, I click on a cell in the grid, and paste into an editor - and nothing is in the clipboard

     

    The fact that you sent me a flash video that doesn't play in any browser I have, makes me wonder, does Kendo's copy/paste partly rely on flash being installed?

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <title>Kendo UI Snippet</title>

        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.118/styles/kendo.common.min.css"/>
        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.118/styles/kendo.rtl.min.css"/>
        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.118/styles/kendo.silver.min.css"/>
        <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2017.1.118/styles/kendo.mobile.all.min.css"/>

        <script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
        <script src="http://kendo.cdn.telerik.com/2017.1.118/js/kendo.all.min.js"></script>
    </head>
    <body>
      
    <div id="grid"></div>
    <script>
    $("#grid").kendoGrid({
        selectable: "multiple cell",
        allowCopy: true,
        columns: [
            { field: "productName" },
            { field: "category" }
        ],
        dataSource: [
            { productName: "Tea", category: "Beverages" },
            { productName: "Coffee", category: "Beverages" },
            { productName: "Ham", category: "Food" },
            { productName: "Bread", category: "Food" }
        ]
    });
    </script>
    </body>
    </html>

  4. Preslav
    Admin
    Preslav avatar
    591 posts

    Posted 21 Mar 2017 Link to this post

    Hello Peter,

    You can share Dojos via URLs. For example, I pasted the provided code snippet in a Dojo, and it is available here: 

    http://dojo.telerik.com/oSAFi

    I am still not able to reproduce the issue with the latest version of Chrome (57.0.2987.110 (64-bit)).

    Further, we do not rely on flash for the discussed scenario.

    With the above said, in order to continue my investigation, could you please check the Chrome DevTools for any JavaScript errors when executing the code in the Dojo? If any are present, please share them with your next reply.

    Additionally, could you also try running the same code in a JS Bin? https://jsbin.com/

    I look forward to your reply.


    Regards,
    Preslav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Peter
    Peter avatar
    58 posts
    Member since:
    Jan 2014

    Posted 21 Mar 2017 in reply to Preslav Link to this post

    Hi, OK thanks.

    I apologize for not watching your video, but I just don't want to install flash on this machine.

    But can I describe in minute detail what I do:

    - I go to your Dojo, click "Run"

    - Then I select "Tea" cell

    - Then I press "Ctrl-C" (Windows/Chrome)

    - Then I use Notepad to check the clipboard by pasting (Ctrl-V)
    Nothing is in the clipboard - certainly not the text "Tea"

     

    I then change the code "selectable" property from "multiple cell" to just "multiple"

    Same problem, nothing in the clipboard after selecting the cell and hitting Ctrl-C 

    ** Now I change the selectable property to "row" 

    BINGO - selecting cell "Tea" and pressing Ctrl-C and then Ctrl-V in Notepad now works!

     

     

  6. Peter
    Peter avatar
    58 posts
    Member since:
    Jan 2014

    Posted 21 Mar 2017 in reply to Preslav Link to this post

    Apologies, I didn't answer your 2 questions.

    There are no errors in the console at all.

    Also note I have ad blocker turned off - so it's effecting any thing. I have no other plugins.

    Sorry, the same HTML doesn't work at all in JSBIN or jsFiddle, and it's not obvious to me what needs to change to make it so. jsFiddle wouldn't accept inline CSS references nor accept HTTP so I gave up.

     

  7. Preslav
    Admin
    Preslav avatar
    591 posts

    Posted 23 Mar 2017 Link to this post

    Hi Peter,

    Thank you for providing the additional details.

    I tested the steps, and I was able to reproduce the issue in a Mozilla Firefox browser. However, this functionality works as expected in Chrome, IE, and Edge.

    I assume that the problem comes from a browser specific issue which is causing the grid to loose focus. That said, a possible workaround might be manually focusing the grid. For example, check the modified Dojo:

    http://dojo.telerik.com/oSAFi/4

    Regards,
    Preslav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Peter
    Peter avatar
    58 posts
    Member since:
    Jan 2014

    Posted 23 Mar 2017 in reply to Preslav Link to this post

    Thanks I am using Chrome so this is odd - I even upgraded to  57.0.2987.110

    I had a colleague test it on Chrome,but it works for him - as it seems to you for you.

    I'll have a tinkle with some things and see if I can figure out what the differing problem might be.

    (BTW It doesn't matter what I do, even with the Dojo you sent... on my Chrome  57.0.2987.110 (which is still in my clipboard after testing your Dojo many times) still doesn't work)

  9. Preslav
    Admin
    Preslav avatar
    591 posts

    Posted 24 Mar 2017 Link to this post

    Hello Peter,

    I am sorry to hear that you are still experiencing this issue.

    Please, do not hesitate to post any information that might help us isolate and reproduce the problem. 

    Regards,
    Preslav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  10. Gachu
    Gachu avatar
    1 posts
    Member since:
    May 2013

    Posted 25 Jan in reply to Preslav Link to this post

    Hi,

    I am using 2013.1.319 version of Kendo ASP.NET MVC, am trying to enable copy contents of grid to excel. But am not seeing AllowCopy property for my Kendo grid, ifAllowcopy available only after certain version, if tat is thecase how can i make it work in older version of Kendo.

    We will not be able to update the Kendo version, we would like to keep the above mentioned version. Any help will be appreciated

     

  11. Preslav
    Admin
    Preslav avatar
    591 posts

    Posted 27 Jan Link to this post

    Hello Gachu,

    Porting features to older versions of Kendo is not doable because these bits of code depend on different functions and logic.

    Having said that, if updating the Kendo version is not doable, the only possible solution is to implement custom code that could provide similar functionality.

    Generally speaking, manipulating the clipboard is not an easy task due to the different security policies of the browsers. For this topic, you could check the following pages:

    Finally, for your convenience, I created the below sample Dojo with JavaScript logic that you could use as a starting point of implementing the needed feature. https://dojo.telerik.com/AQIZuMus

     

    Regards,
    Preslav
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top