New to Telerik UI for ASP.NET MVC? Download free 30-day trial
ASP.NET MVC Grid Paste from Excel
- EXAMPLE
- VIEW SOURCE
-
Change Theme
defaultDefault Theme
- Main
- Main Dark
- Nordic
- Ocean Blue
- Ocean Blue A11Y
- Purple
- Turquoise
Bootstrap Theme- Main
- Bootstrap 3
- Bootstrap 3 Dark
- Main Dark
- Nordic
- Turquoise
- Turquoise Dark
- Urban
- Vintage
Material Theme- Main
- Arctic
- Lime Dark
- Main Dark
- Nova
Classic Theme- Main
- Green
- Green Dark
- Lavender
- Lavender Dark
- Main Dark
- Metro
- Metro Dark
- Moonlight
- Opal
- Opal Dark
- Silver
- Silver Dark
- Uniform
Fluent Theme- Main
Also available for:
CLIENT-SIDE API SERVER-SIDE APIDescription
The Telerik UI for ASP.NET MVC 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 MVC Grids.