I am trying to get order by alphabetical only the orderby desc is working but when i try order by alphabatical it doesn't work. Is there any where that i can get sort order by aplabetical? I am using razor macro script here is my code var nodes = Model.Children.OrderBy("Name asc");
macro razor script How to order by Alphabetical
Hello ,
I am trying to get order by alphabetical only the orderby desc is working but when i try order by alphabatical it doesn't work. Is there any where that i can get sort order by aplabetical? I am using razor macro script here is my code var nodes = Model.Children.OrderBy("Name asc");
Thank you .
MC
Hi MC,
Did you try just to order by name and see if it give the result that you are after. The default sort order as I remember is asc, so try this:
Hope it heps,
/Dennis
Hi Dannis ,
Thank you for quick reply. its work very well. I have another question can i order by mulitple like order by Type then by name
or can i do something like goup by Type order by name something like this ?
MC.
Hi MC,
Yep, you can do more complex ordering by multiple properties, with descending and ascending support: It will look like this in shorthand syntax;
If it doesn't work you could try this syntax:
/Dennis
Thank you Denis I am appreciated your help.
MC.
is working on a reply...