It looks like there is a bug in Fluidity but you can preserve desired order by sorting it like this.
var property = Model.Content.GetProperty(alias);
var desiredOrder = property.DataValue.ToString().Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x));
var data = property.GetValue<IEnumerable<object>>().Cast<FluidityModel>();
var orderedData data.OrderBy(item => desiredOrder.IndexOf(item.Id)).ToList();
For production use you should of course write this in a nicer way.
Sorting Fludity entities
Hi, I'm using Fluidity Entity Picker to select some speakers to show in slider. However, they are sorted by Name and not by specified order in picker.
I'm getting a property like this:
Thanks for any help. Should I do it differently?
It looks like there is a bug in Fluidity but you can preserve desired order by sorting it like this.
For production use you should of course write this in a nicer way.
is working on a reply...