CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.89k stars 1.38k forks source link

[Feature] DataGrid - Cell copy, paste, drag-fill #4873

Open deathmetallic opened 1 year ago

deathmetallic commented 1 year ago

Describe the problem

To do data entry into DataGrid the user must click into a cell's Editing mode, then enter data (text, date, other controls, etc). For smaller applications this is fine, but if needing to do a lot of data entry (e.g. enter data for 300 grid items) it would take a very long time to enter the data. There does not appear to be anything built into the API to easily copy/paste data between cells (when not in the Editing mode) or other editing options to reduce data entry time.

As is, the DataGrid editing functionality is really only good for smaller-scale datasets or where infrequent edits are needed. For larger datasets/data entry it becomes tedious to enter/update data in larger quantities.

Describe the solution

It would be useful to add drag-fill and copy/paste functions to DataGrid similar to Excel spreadsheet functionality.

Alternatives

Some third-party controls have this functionality, but it either very expensive or not compatible with UWP projects. Not having this as part of the API would require developers to create custom, moderate-complexity code to accomplish these functions.

Because these functions are somewhat standard in spreadsheet applications and a "standard" implementation as described above would likely be useful with limited modification needed from the API standard (it would likely not be common for this functionality to often need to be changed from how it works out-of-the-box DataGrid), I would suggest this as a feature for implementation into the DataGrid control.

Additional info

Here are some screenshots of the Excel drag-fill and copy/paste function for anyone not familiar. image image image image

This is what the Excel cell looks like when selected, with a Fill indicator in the bottom-right image

When the user hovers over the indicator and/or begins drag/drop in Excel, the cursor icon turns into the plus symbol. image

Help us help you

No.

ghost commented 1 year ago

Hello, 'deathmetallic! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future!

danielancines commented 1 year ago

This feature will be awesome!! @deathmetallic did you find any workaround? I need to implement something like this to allow user to select cells and copy its content to clipboard, but all classes are sealed and I'm not able to inherit and make my own code on ti.