I am trying to get the sort working correctly on this field in a xamdatapresenter. The ascending sort seems to work fine (1, 2, 3 ,4 ,5 ,6,7,8,910,11,12,13,14,15,16) but when i click the arrow for descending, the order is incorrect. It is (16,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15). ?? Um, why does 16 come before everything else here? Also, is there an easy way to sort alphabetically vs numerically etc?
<igDP:UnboundField x:Name="Index" Label="#" Column="0" RowSpan="2" Converter="{StaticResource ValueConverter}"> <igDP:UnboundField.Settings> <igDP:FieldSettings CellMinWidth="30" CellMaxWidth="30"> <igDP:FieldSettings.CellValuePresenterStyle> <Style TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <TextBlock Text="{Binding Path=DataItemIndex, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource IndexConverter}}" VerticalAlignment="Center"/> </ControlTemplate> </Setter.Value> </Setter> </Style> </igDP:FieldSettings.CellValuePresenterStyle> </igDP:FieldSettings> </igDP:UnboundField.Settings> </igDP:UnboundField>______________________________________________________i coudn't see most of the code when i viewed this, so here it is again below<igDP:UnboundField x:Name="Index" Label="#" Column="0" RowSpan="2" Converter="{StaticResource ValueConverter}"><igDP:UnboundField.Settings><igDP:FieldSettings ><igDP:FieldSettings.CellValuePresenterStyle><Style TargetType="{x:Type igDP:CellValuePresenter}"><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"><TextBlock Text="{Binding Path=DataItemIndex, UpdateSourceTrigger=PropertyChanged,Converter={StaticResource IndexConverter}}"/></ControlTemplate></Setter.Value></Setter></Style></igDP:FieldSettings.CellValuePresenterStyle></igDP:UnboundField.Settings></igDP:UnboundField>oh i included the indexconverter and valueconverters as well
Hello,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
I tried your code and it doesn't work correctly either, I get out of order and missing in "Index #'s. However; I was unaware that there was additional code in the code-behind that is doing somethign also.