Interacciones del portapapeles de la cuadrícula Angular
Las operaciones de copia al portapapeles ahora están disponibles en la cuadrícula. Esta función proporciona una forma rápida, fácil y personalizable de copiar datos de la cuadrícula de datos Angular a través de la selección de datos de múltiples celdas actual. El comportamiento del portapapeles del sistema le brinda al usuario la capacidad de copiar datos de la cuadrícula a Excel u otros programas externos.
Angular Grid Clipboard Interactions Example
Functionality
El comportamiento de copia funciona con la interacción predeterminada definida por el navegador y el sistema operativo. Así, para los comportamientos de copiar y pegar, estos son:
- Basado en Windows/Unix
- Ctrl + C / Ctrl + Ins como atajo de teclado
- Ctrl + V / Shift + Ins como atajo de teclado
- Copiar acción a través del menú del navegador.
- Mac OS
- ⌘ Cmd + C como atajo de teclado
- ⌘ Cmd + V como atajo de teclado
- Copiar acción a través del menú del navegador.
Limitations
- Both the cut and copy events are not natively supported in Internet Explorer. The exception is the
paste event (IE 11) which is emitted but does not expose the
clipboardDataproperty in the event.
Note
In order to copy cells in IE 11, you can use the keyboard selection. Hold the shift key in order to make a multi-cell selection, press Ctrl + C in order to copy.
- El comportamiento de copia está deshabilitado mientras la cuadrícula está en modo de edición.
- The current version of this feature covers only the
copyfrom grid behavior. Later on we plan to exposepastewithin grid behavior. You can use a custom paste handler in order to configurepastebehavior, have a look at our Paste from Excel topic.
API Usage
We expose clipboardOptions @Input property, which handles the following options:
enabledEnables/disables copying of selected cells.copyHeadersInclude the associated headers when copying.copyFormattersApply any existing column formatters to the copied data.separatorThe string separator to use the for formatting the data in the clipboard. Default is/t
Note
Excel can automatically detect text that is separated by tabs (tab-delimited /t) and properly paste the data into separate columns. When the paste format doesn't work, and everything you paste appears in a single column, then Excel's delimiter is set to another character, or your text is using spaces instead of tabs.
gridCopyEmitted when a copy operation is executed. Fired only if copy behavior is enabled through theclipboardOptions
Additional Resources
- Descripción general de la cuadrícula
- Paginación
- Filtración
- Clasificación
- resúmenes
- Fijación de columnas
- Selección
- Virtualización y rendimiento
- Encabezados de varias columnas