wcf ria services - Custom sort in domaincollectionview -
i'm using dcv property in view model. works fine custom sort? have string property in model should sorted alphanumerically. how can achieve such thing?
upd:
model:
public class mymodel { ///... public someproperty {get;set;} }
xaml:
<data:datatextcolumn binding={binding path=someproperty}, canusersort=true />
when sorting within datagrid, property gets sorted disregard alphanumeric order, i.e. in regular string way. i'd apply custom sort, e.g. introducing own icomparer. no api available @ least know of it. clues?
the domaincollectioview has special collection:
sortdescriptions
you add next code in viewmodel:
dcv.sortdescriptions.add(new sortdescription("someproperty ", listsortdirection.ascending));
Comments
Post a Comment