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
Hey Guys. I would do this but do not know how.
I get the query:
201020072006200720072007201020092006
I would get
2010200920072006
Is it possible?
foreach (var item in Model.NodeById(1205).Children.GroupBy("Name")){ @item.Name <br />}
It does not work!. I use Umbraco 4.11.5
Not sure what you are trying to do here !!
Have a look at this topic: http://our.umbraco.org/forum/developers/api-questions/41908-Get-Distinct()-on-a-ListDynamicNode
Jeroen
Thank you Jeroen Breuer!. What is accu bottlenose porpones the DTOs and then do not repeat each other?
I tried this:
@ {
var mylist = new List ();
if (! mylist.Select (x => x.Id). Contains (1))
{
mylist.Add (new DynamicNode(1));
}
@mylist.ToList();
And I get this:
"Error CS0305: Using the generic type 'System.Collections.Generic.List' REQUIRES 1 type arguments".
Because that Razor will get a list of different data becomes complicated?. Grrr hehe.
You could just do as I have described here.
http://our.umbraco.org/forum/templating/templates-and-document-types/56965-GroupBy-Issue#comment206450
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Distinct Values in Razor
Hey Guys. I would do this but do not know how.
I get the query:
I would get
Is it possible?
It does not work!. I use Umbraco 4.11.5
Thank you!
Not sure what you are trying to do here !!
Have a look at this topic: http://our.umbraco.org/forum/developers/api-questions/41908-Get-Distinct()-on-a-ListDynamicNode
Jeroen
Thank you Jeroen Breuer!. What is accu bottlenose porpones the DTOs and then do not repeat each other?
I tried this:
@ {
var mylist = new List ();
if (! mylist.Select (x => x.Id). Contains (1))
{
mylist.Add (new DynamicNode(1));
}
@mylist.ToList();
}
And I get this:
"Error CS0305: Using the generic type 'System.Collections.Generic.List' REQUIRES 1 type arguments".
Because that Razor will get a list of different data becomes complicated?. Grrr hehe.
You could just do as I have described here.
http://our.umbraco.org/forum/templating/templates-and-document-types/56965-GroupBy-Issue#comment206450
is working on a reply...