GRID FEATURE
Copy rows
Copy a row's displayed columns as tab-separated text. Spreadsheet apps paste each column into a separate cell, making it useful for transferring several values from one order.
How it works and when to use it
copyRowAt accepts the current display position. If your app selects rows by business ID, locate that ID in the displayed view before copying.
In the code, grid is the Grid element prepared in the installation chapter. Check each example's data and settings, and implement the app functions and server endpoints for your project.
Example 1. Copy the current first row
Connect row copying to a user button click.
console.log(await grid.copyRowAt(0));Verify the result: Displayed column values are copied as TSV. Hidden columns are excluded from copying based on displayed columns.
Example 2. Copy from a compact view
Hide the unit price column, then copy the same row.
await grid.hideColumn('price');
// Call from the user's Copy button
console.log(await grid.copyRowAt(0));Verify the result: Paste into a spreadsheet to compare the order and count of the displayed columns.
Example 3. Compare with copying multiple rows
To transfer multiple orders, choose range copying or CSV export instead of repeatedly copying individual rows.
Verify the result: Offer clear choices for transferring a single row once and transferring a batch through a file.
Combining features and troubleshooting
Tabs, line breaks, and formula-like text inside cells may be interpreted differently by the receiving app. Verify behavior in the actual destination app.
A selection checkbox does not make copyRowAt automatically target the selected row. Explicitly pass the displayed row position.
Related reading
- How rows, columns, and IDs relate
- Connect results and events
- Explore in Features
The guide describes which interactions are available to try.