Coder Social home page Coder Social logo

Comments (3)

mennowo avatar mennowo commented on August 19, 2024

I've been trying my hand at this a little. I added an attached property on the Cell, in order to set the SortMemberPath property. This works, I am now able to click on the column headers and the small sorting arrow appears, however, no sorting happens. I am unsure how to proceed.

The code is here: https://github.com/mennowo/Gu.Wpf.DataGrid2D

Any help appreciated!

from gu.wpf.datagrid2d.

JohanLarsson avatar JohanLarsson commented on August 19, 2024

This may be a limitation of the framework DataGrid try handling the Sort event and set a custom comparer.
At least when binding with MultiBining sorting does nothing by default. Alternatively specifying SortMemberPath may work if that is an option.

from gu.wpf.datagrid2d.

mennowo avatar mennowo commented on August 19, 2024

Thanks for your reply. Where would you go about and handle the Sort event? Since these are all attached properties, I'm not sure what is a good way of doing this without repeating it each time the grid is rebuilt. Also, I'm unsure how to set the comparer in the Sort event: would one get the default view via CollectionViewSource and add a SortDescription?.

In the current implementation, I'm not using a MultiBinding. I already set the SortMemeberPath, here. It has the effect of being able to click on column headers, however, that has no sorting effect. I'm unsure if I properly set up registration and manipulation of SortMemberPath (in Cell.cs), but equally unsure how to check this and proceed.

from gu.wpf.datagrid2d.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.