Copy-Paste Cell/Row data through RadContextMenu with Batch Editing

Thread is closed for posting
1 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 19 Aug 2014 Link to this post

    Requirements

    Telerik Product and Version

    UI for ASP.NET AJAX (version 2013.3 1324 and above)

    Supported Browsers and Platforms

    all browsers supported by UI for ASP.NET AJAX 

    Components/Widgets used (JS frameworks, etc.)


     
    PROJECT DESCRIPTION

    This code library demonstrates how to implement Copy-Paste functionality for cells and rows for RadGrid in Batch Edit Mode with RadContextMenu.
    Copy-Paste Cell and Row values in RadGrid with Batch Editing

    Implementation

    For implementing this functionality we need a RadContextMenu control, which will be used for displaying the options for copy-pasting cell/row data. The RadContextMenu must be manually shown within the client-side OnRowContextMenu client-side event of the grid.

    By default, ”Paste Cell” and “Paste Row” options are disabled and will be enabled only after a cell or a row is copied.

    For highlighting the target and copied cell/row, custom CSS classes are added to the elements when hovering over the “Copy Row”, (“Copy Cell”), “Paste Cell” and “Paste Row” items in the RadContextMenu. The cell/row from which the data is going to be pasted is also highlighted.

    Attached to this code library are two different versions for copy-paste functionality.



    Version 1

    In the first version, the user is allowed to copy individual cell and paste the value in any cell. The RadContextMenu exposes the following options:

    • Copy cell
    • Paste cell
    • Copy row
    • Paste row

    Version 2


    The second version is more strict and will allow the user to copy and paste cell values only from the same column. In this version, the user will have the listed below options:

    • Copy
    • Paste cell
    • Paste row


Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.