Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Antony,
I have noticed that the Latest Comments are not being displayed in the correct order, ie last comment first. Analysing your other razor scripts for a clue I am none the wiser. Is this a feature?
Thanks.
blog.promulgate.co.uk
Let's call it a feature :/
ps. You can easily add a sort.
it will be something like:
.OrderByDescending(x => x.CreateDate);
Sorry Anthony.
Where in the listcomments script is this applied? Is it here?
nodes = ((
IEnumerable<DynamicNode>)CommentService.Instance.GetComments(Model.Id, true)).Take(count).OrderByDescending(x=> x.CreateDate);
Still learning Razor
OrderByDescending() should go before the Take()
IEnumerable<DynamicNode>)CommentService.Instance.GetComments(Model.Id, true)).OrderByDescending(x=> x.CreateDate).Take(count);
Order the comments, then Take a few from the ordered list.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Comments not in latest date order
Hi Antony,
I have noticed that the Latest Comments are not being displayed in the correct order, ie last comment first. Analysing your other razor scripts for a clue I am none the wiser. Is this a feature?
Thanks.
blog.promulgate.co.uk
Let's call it a feature :/
ps. You can easily add a sort.
it will be something like:
.OrderByDescending(x => x.CreateDate);
Sorry Anthony.
Where in the listcomments script is this applied? Is it here?
nodes = ((
IEnumerable<DynamicNode>)CommentService.Instance.GetComments(Model.Id, true)).Take(count).OrderByDescending(x=> x.CreateDate);
Still learning Razor
OrderByDescending() should go before the Take()
IEnumerable<DynamicNode>)CommentService.Instance.GetComments(Model.Id, true)).OrderByDescending(x=> x.CreateDate).Take(count);
Order the comments, then Take a few from the ordered list.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.