Skip to content

Cannot use EditingTemplateSelector without also using EditingTemplate #396

Description

@Mangepange

Description:

It is not possible to use the EditingTemplateSelector without also setting an EditingTemplate. The cell think it's readonly.

The error lies here in TableViewCell.cs:

/// <summary>
/// Gets a value indicating whether the cell is read-only.
/// </summary>
public bool IsReadOnly => TableView?.IsReadOnly is true || Column is TableViewTemplateColumn { EditingTemplate: null } or { IsReadOnly: true };

This logic must also check if the EditingTemplateSelector is not null.
A workaround is to set the EditingTemplate to an empty DataTemplate, because then this logic will return true, and when the editing element is generated, the EditingTemplateSelector is queried before using the EditingTemplate.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions