Skip to content
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

Feature: editable DataGridTemplateColumn #7315

Merged

Conversation

timunie
Copy link
Contributor

@timunie timunie commented Jan 5, 2022

What does the pull request do?

make the DataGridTemplateColumn editable

What is the current behavior?

it is not possible to edit a cell in DataGridTemplateColumn out of the box, see Discussion #6553

What is the updated/expected behavior with this PR?

The developer can provide an IDataTemplate to CellEditingTemplate and the user can then edit the cell like other cells.

How was the solution implemented (if it's not obvious)?

  • Added property CellEditingTemplate (type: IDataTemplate`)
  • Make DataGridColumn.IsReadOnly virtual, so it can be overridden by DataGridTemplateColumn

Checklist

  • Added unit tests (if possible)? ► Are there any needed? if yes, please guide me which tests are needed
  • Added XML documentation to any related classes?
  • Consider submitting a PR to https://github.com/AvaloniaUI/Documentation with user documentation ► should be done after this PR is merged.

Breaking changes

None. The DataGridTemplateColumn is still read-only if no editing template is provided.

Obsoletions / Deprecations

None

Preview:

ControlCatalog.Desktop_5hqBdMtZiu.mp4

Fixed issues

Fixes #7314

Tim U added 6 commits January 5, 2022 08:35
The constructor was needed to override IsReadonly. This is not needed anymore.
- Set the focus to the TextBox of the NumericUpDown
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 0.10.999-cibuild0017737-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]

Copy link
Member

@maxkatz6 maxkatz6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@maxkatz6 maxkatz6 enabled auto-merge January 7, 2022 06:44
@maxkatz6 maxkatz6 merged commit c0425c2 into AvaloniaUI:master Jan 7, 2022
@timunie timunie deleted the feature/EditableDatagridTemplateColumn branch January 11, 2022 14:51
danwalmsley pushed a commit that referenced this pull request Jan 24, 2022
…eColumn

Feature: editable `DataGridTemplateColumn`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make DataGridTemplateColumn editable
4 participants