This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Jason, Sorry for so many postings as of late. You can regard this one as lower priority. As I have described in past postings, I generally set the Columns.DisplayMemberBinding to a binding that is typically based on a PropertyDescriptor (which may or may not wrap a PropertyInfo). I think the reason it doesn't work for grouping is that the DataGrid.UpdateGrouping method appears to only consider Column.PropertyInfo.Name (and it does is twice for some reason), which gives just the useless "(0)". Therefore, the GroupDescriptions are unable to get the property values. The GroupDescription appears to be rather inflexible, and I noticed your comment:
So I am hoping you might be able to redesign this to work with my bindings, or expose some way I can supply a function to get property values for a column. Thanks Peter |
|
|
Hello Peter I had been experimenting with using GroupDescription in hopes to reduce coupling between DataGridItemsSource/DataGridColumn, make testing easier, and make it possible to programatically group by a property, rather than relying on an existing DataGridColumn instance. But as you noted, I ended up running into limitations and performance issues. I have not lost hope on this direction though as I have solved similar issues before, but I have parked it for now. In the next nightly build I have somewhat restored the previous implementation enough for DisplayMemberBinding columns to group correctly again. -Jason Fauchelle |
|
|
Hi Jason, As always, thanks for the quick response. I will try the new version. Thanks Peter |
|
|
Hi Jason, I have confirmed that grouping seems to be working very well now with my bindings. Thanks Peter |
|