If you're using chrome and you hover the node in the tree you can see the id on the bottom left :). You can also look at the umbracoNode table in the database to find het id.
Think if you roll over the datatype and look in the browser status bar the id is revealed, but rather than relying on finding the datatype id, you could look it up using the name
@ Jeroen, Thanks, this solves my problem @ Mike thanks your Linq solution solves the problem of using a hardcoded datatype id and I'll certainly give it a try. I'll let you know if it worked out.
where to find the ID of a datatype
Hi,
for my registerMember.ascx user control I need to load the prevalues of a checkboxlist datatype. For this use the Umbraco library method:
umbraco.library.GetPreValues(1097)
the problem I have is that I don't find the id of this datatype. The only thing that I see is the GUID of the datatype:
Could it be that this has changed from Umbraco 4.5.1 over Umbraco 4.7.1 ? Or am I overlooking something?
Thanks for your help,
Anthony
If you're using chrome and you hover the node in the tree you can see the id on the bottom left :). You can also look at the umbracoNode table in the database to find het id.
Jeroen
Think if you roll over the datatype and look in the browser status bar the id is revealed, but rather than relying on finding the datatype id, you could look it up using the name
A bit of linq may help...
something along the lines of
ICollection values = PreValues.GetPreValues(DataTypeDefinition.GetAll().First(dtDef => dtDef.DataType.DataTypeName.ToString() == "Job Experience DataType").DataType.DataTypeDefinitionId).Values;
@ Jeroen, Thanks, this solves my problem
@ Mike thanks your Linq solution solves the problem of using a hardcoded datatype id and I'll certainly give it a try. I'll let you know if it worked out.
greetings,
Anthony
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.