User (Old forums)MemberJune 14, 2007 at 9:16 amPost count: 23064
I am using the latest v1.1 plus update. I create the columns in code (assigning FieldNames) and assign a GroupDescription as follows:
DataGridGroupDescription gd = new DataGridGroupDescription(“CommonName”);
where CommonName is the Title, Fieldname, DataBinding of the column that I would like to group on.
On display of the grid, the data is complete and the Grouping Header contains the command button that corresponds to this group. However the grouping has not taken place.
If I click the Group button then the grouping happens as expected (cycling through the 3 clicks for ascending, descending and no sort also works).
How do I get the grouping to work immediately rather than having to click the Group button?
Imported from legacy forums. Posted by Derek (had 3699 views)User (Old forums)MemberJune 14, 2007 at 10:59 amPost count: 23064
This would be my fault as I had not implemented the DataGridCollectionView to wrap the ObservableCollection. I was still attaching the ObservableCollection to the grid’s ItemsSource directly.
Imported from legacy forums. Posted by Derek (had 2723 views)User (Old forums)MemberApril 24, 2009 at 7:44 pmPost count: 23064
Hi Derek, you might know the answer to the question I have been trying to find.
Using the code posted initialy by you, is there any way you can indicate to the group to be sorted by the value of the items in other column within the grid?
Thanks in advance.
Imported from legacy forums. Posted by Giuliano (had 365 views)User (Old forums)MemberApril 25, 2009 at 5:50 amPost count: 23064
Not something I have looked at, but can you do anything with the SortDescriptions collection of the DataGridCollectionView at the same time that you set the Grouping? For example,
DataGridCollectionView dgcv = this.ItemsSource as DataGridCollectionView;
dgcv.SortDescriptions.Add(new SortDescription(“sort column”, ListSortDirection.Ascending));
Imported from legacy forums. Posted by Derek (had 2080 views)User (Old forums)MemberApril 27, 2009 at 4:11 pmPost count: 23064
Thanks for your reply Derek.
I tried your suggestions but as soon as I declared the group description, it orders the data by that group and the previous column sorted (by the code provided) is totally ignored.
Any suggestions, maybe there is a way to change the sorting of a group by overriding the xceed built-in sorting?
Imported from legacy forums. Posted by Giuliano (had 2489 views)
- You must be logged in to reply to this topic.