New to Telerik UI for ASP.NET Core? Download free 30-day trial

ASP.NET Core Grid Paste from Excel

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
  • Edit in Telerik REPL
HtmlHelper
TagHelper
Files:
paste_from_excel.cshtml
Paste_From_ExcelController.cs
BasicUsageController.cs
OrderViewModel.cs
Paste_From_Excel_TagHelper.cshtml

Also available for:

CLIENT-SIDE API HTML HELPER API

Description

The Telerik UI for ASP.NET Core Data Grid provides a built-in paste functionality that allows you to copy cells from MS Excel or another Grid component and paste them in the desired Grid. Based on the selected pasting operation, you can either replace the selected Grid cells with the copied cells or insert them as a new Grid row.

To enable the paste operations of the Grid:

  • Add the AllowPaste(true) option.
  • Make the Grid selectable by setting .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple).Type(GridSelectionType.Cell)).
  • Enable the keyboard navigation functionality through the Navigatable() method.
  • Include the Paste() command in the Grid's ToolBar to display a dropdown control with the available paste operations—Insert (Paste (Insert)) and Replace (Paste (Replace)) modes.

This demo shows how to implement the paste feature of the Data Grid to insert new rows or replace the selected cells with the copied cells from an Excel document or other Telerik UI for ASP.NET Core Grids.

Additional Apps

This Grid example is part of unique collection of hundreds of ASP.NET Core demos, with which you can see all Telerik ASP.NET Core components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for ASP.NET Core or ThemeBuilder.

Support & Learning Resources

Additional Resources