Editing in TreeDataGrid is controlled by:
CanEdit)BeginEditGestures)WhenSelected flag)BeginEditGestures values:
NoneF2TapDoubleTapWhenSelectedDefault (F2 | DoubleTap)WhenSelected acts as a modifier: gesture only begins edit when row/cell is selected.
new TextColumn<Person, string>(
"Name",
x => x.FirstName,
(m, v) => m.FirstName = v,
options: new TextColumnOptions<Person>
{
BeginEditGestures = BeginEditGestures.F2 |
BeginEditGestures.Tap |
BeginEditGestures.WhenSelected,
})
Works similarly for TemplateColumnOptions<TModel> and CheckBoxColumnOptions<TModel>.
For editable cells:
Enter / focus lost) or cancel (Escape)CellValueChanged may be raised by gridTextColumn: editable only with setter constructor overloadTemplateColumn: editable only when editing template existsCheckBoxColumn: value changes immediately when not read-onlyF2: begin edit when enabledEnter: commit current editEscape: cancel current editTap not in gesture flagsWhenSelected without ensuring proper selection mode/stateFeature behavior differs from expectations
Cause: one or more options in this scenario are configured differently (source type, column options, sort/selection/edit state).
Fix: compare your setup with the snippet in this article and verify runtime values on Source, Columns, and Selection.
Data changes are not visible in UI
Cause: model or collection notifications are missing, or a replaced collection/source is not re-bound.
Fix: ensure INotifyPropertyChanged/INotifyCollectionChanged flow is active and reassign Source after replacing underlying collections.