I have a similar issue and I was hoping you guys might be able to help me. I have a GlobalFunctions.cshtml file where I have a SortList function that takes and returns a DynamicNodeList.
As the site is bi-lingual, I need to sort the nodes in the DynamicNodeList by the title attribute depending on the culture. I've tried to apply the techniques suggested in the SO link but DynamicNodeList.OrderBy<T>() only takes one argument, the property. It doesn't allow me to specify a culture.
Does anyone know of a way in which I can perform a culture specific sort on a DynamicNodeList?
OrderBy returns wrong sorting when "Name" contains danish letters
Hello,
I am facing an issue when trying to sort a DynamicNodeList alphabetically when the words contains non-english characters.
The letter 'å' seems to be treated like the letter 'a' with an accent instead of an independant letter.
This results in an example sequence of
{'Målgruppe', 'Marked', 'Moderne'}
when in fact the sequence should be
{'Marked', 'Moderne', 'Målgruppe'}.
I have not found any way to fix this using .OrderBy("Name")
Is there a way to change the language to use when sorting?
Can someone help me get this right?
Thanks in advance
Mikkel Johansen
Have you tried something like this?
http://stackoverflow.com/questions/3139115/linq-order-by-problem-depending-on-language
If the LINQ is done via the NHibernate LINQ provider, this will most likely be based on the collation of your database.
I have a similar issue and I was hoping you guys might be able to help me. I have a GlobalFunctions.cshtml file where I have a SortList function that takes and returns a DynamicNodeList.
As the site is bi-lingual, I need to sort the nodes in the DynamicNodeList by the title attribute depending on the culture. I've tried to apply the techniques suggested in the SO link but DynamicNodeList.OrderBy<T>() only takes one argument, the property. It doesn't allow me to specify a culture.
Does anyone know of a way in which I can perform a culture specific sort on a DynamicNodeList?
Thanks
I'm facing the same problem, and I'm very interested in any solution to this.
Bug is reported on Codeplex - Please go vote. So it can be fixed in 4.8.
http://umbraco.codeplex.com/workitem/30782
is working on a reply...