Hello,
i got a XamComboEditor inside a XamDataGrid with a LookUpList Int / String. (It works fine)
If i sort after this field, its randomly before or after the DisplayMember is subsituted by the text. (The LookUpList ItemSource is set only once at start, so its always there already.) I saw this in GroupByRecord.Description, while override the GroupByComparer, trying to workaround this..
Shouldnt it always be sorted after subsituted by text. And if not, is there an event i can listen for after loaded a new ItemSource to the Grid? (Binding)
xaml:
c#:_grid.FieldLayouts[0].SortedFields.Clear();_grid.FieldLayouts[0].SortedFields.Add(new FieldSortDescription("NrID", System.ComponentModel.ListSortDirection.Ascending, true));_grid.Records.RefreshSort();
GreetingsKiTs
Hi Joerg,
I'm not really sure what exactly you mean by sorting after a field and it randomly being before or after the display member is substituted. If I add a XamComboEditor to a Field as the editor and I give it the items source, once I run your code for sorting and grouping the field I don't see anything out of the ordinary. I don't notice anything being substituted. Can you take a look at my sample and modify it to reproduce your issue, then send it back to me?
Hello Rob,
i modified your sample and implemented a custom GroupByComparer. If you debug breakpoint the Compare method, in my project you see the Description Property of the GroupByRecord is sometimes "8 (2 records)" and sometimes substituted with its LookUp text "test (2 records)". (Initiated by the same function/command, multiple times)
I cant reproduce this behaviour in this example project, i suppose its something asynchronous. In my project there are of course more columns, events, formating and other stuff..
(I tried some more, as u can see in the example project, like ViewModel add data at runtime by Task etc., dont know which is related.)
GreetingsJoerg