Skip to content

Feature: inserting multiple items from clipboard #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vojtechmusilek
Copy link
Contributor

This adds option to insert multiple items separated by new line from clipboard when selecting row and hitting Ctrl+V. It will always insert items above selected row. Old Ctrl+V behaviour is preserved, when clipboard does not contain new line it will replace existing item.

I did not find a way to make "generic" item in PasteDataGridItemFromClipboard method that would work for all 3 cases so I added a callback which requests new item to be created by the caller. Maybe there is a way to improve this code?

Also one extra case could be that text in clipboard contains new line but only single item. In that case I'm not sure what is better, inserting one new item (currently implemented) or replacing the selected item. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant