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
How can I do this? closest I've got is:
pagesToList = @Model.children.Where("Name = @0", LettertoLookup)
Thanks,pete
You can do this :
@{var pagesToList = Current.GetChildrenAsList.Items.Where(node => node.Name.StartsWith(LettertoLookup)).ToList();}
Thanks dawoe, but I get a:
Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type
error when I use that?
This is what I ended up using, thanks for your help, it got me started! Pete.
DynamicNode n = @Model; List<DynamicNode> nl = @Model.Children.Items; foreach(dynamic item in nl.Where(x => x.Name.StartsWith(currentLetter))){ <p>@item.Name</p> }
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
Select where name starts with certain letter?
How can I do this? closest I've got is:
Thanks,pete
You can do this :
Thanks dawoe, but I get a:
error when I use that?
This is what I ended up using, thanks for your help, it got me started! Pete.
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.