Open sps014 opened 11 months ago
Hi, I have the following code to add columns , after trying various combination for hours i am still failing to make text editable.
Source = new FlatTreeDataGridSource<EntityViewModel>(Entries); Source.Columns.Add(new TextColumn<EntityViewModel, string>(nameof(EntityViewModel.Key), x => x.Key, null, new() { IsTextSearchEnabled = true, BeginEditGestures =BeginEditGestures.Tap, CanUserSortColumn = true })); foreach(var c in Languages) { var header = c == string.Empty ? "Neutral" : c; Source.Columns.Add(new TextColumn<EntityViewModel, string>(header, x => x.CultureValues[c],null, new() { IsTextSearchEnabled = true, BeginEditGestures = BeginEditGestures.Tap, CanUserSortColumn = true, TextTrimming= TextTrimming.CharacterEllipsis, MaxWidth=new GridLength(300,GridUnitType.Pixel) })); }
here is my class whose items are populated.
public class EntityViewModel { public string? Key { get; set; } public Dictionary<string, string?> CultureValues { get; set; } = new(); public EntityViewModel(Entity entity) { foreach(var culture in entity.Cultures) { CultureValues.Add(culture,entity.GetValue(culture)); } } }
I supose Editing was implemented with https://github.com/AvaloniaUI/Avalonia.Controls.TreeDataGrid/pull/162 .
Thanks.
Tried to make Text Column Cells editable in the same way, had the same issue. I got TreeDataGrid NuGet Package 11.0.2
I can't make to work even F2 gesture
Hi, I have the following code to add columns , after trying various combination for hours i am still failing to make text editable.
here is my class whose items are populated.
I supose Editing was implemented with https://github.com/AvaloniaUI/Avalonia.Controls.TreeDataGrid/pull/162 .
Thanks.