AvaloniaUI / Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
https://avaloniaui.net
MIT License
24.79k stars 2.15k forks source link

DataGrid should implement SelectionModel #8060

Open timunie opened 2 years ago

timunie commented 2 years ago

Is your feature request related to a problem? Please describe. ListBox has a great selection model which is way better than on WPF. The DataGrid is missing this. A discussion on telegram showed that this feature should be implemented.

Describe the solution you'd like Implement SelectionModel

Describe alternatives you've considered Use Behavior, Events or an AttachedProperty

Additional context If I manage to implement, I'll provide a PR.

workgroupengineering commented 2 years ago

I think the post to fix the DataGrid is better to replace it with https://github.com/wieslawsoltes/DataBox

timunie commented 2 years ago

Are suggesting to pull the DataBox into Avalonia? Or do you want me to switch in my App to the DataBox Control?

workgroupengineering commented 2 years ago

Are suggesting to pull the DataBox into Avalonia? Or do you want me to switch in my App to the DataBox Control?

first

timunie commented 2 years ago

@wieslawsoltes @danwalmsley what do you think about it?

Takoooooo commented 2 years ago

I suggest not investing your time in DataGrid and using TreeDataGrid. Sooner or later we will replace DataGrid with TreeDataGrid. Also as i remember it supports SelectionModel

workgroupengineering commented 2 years ago

Hi @Takoooooo , I prefer DataBox to TreeDataGrid, because TreeDataGrid column customization is just by code.

robloo commented 2 years ago

I don't think TreeDataGrid has the same level of functionality and likely never will. So I still vote for keeping the DataGrid current and even porting WPF's version over eventually. That said, adding selection model to the existing DataGrid code probably is not a simple task -- if it's doable though, great.