Quick question - is there any way to use an uComponents data type (country picker, specifically) within a usercontrol, in which it would render as a dropdown and be programatically available to the codebehind?
The Country Picker data-type populates the dropdown list with countries from the .NET framework. It would be simplier to create your own DropDownList, than trying to re-use the data-type control.
Sure, from the user control you can read the property of that data type just like any other property, with maybe the difference that the result would be xml.
Using Data Type in usercontrol
Quick question - is there any way to use an uComponents data type (country picker, specifically) within a usercontrol, in which it would render as a dropdown and be programatically available to the codebehind?
Hi Tom,
The Country Picker data-type populates the dropdown list with countries from the .NET framework. It would be simplier to create your own DropDownList, than trying to re-use the data-type control.
Simon Dingly has a good blog post on this: C# Utility method to populate list controls with all countries as given in ISO 3166-1
Cheers, Lee.
Sure, from the user control you can read the property of that data type just like any other property, with maybe the difference that the result would be xml.
Brilliant - cheers!
It's also possible to add real Data Types to a UserControl. Have a look at this topic: http://our.umbraco.org/forum/developers/extending-umbraco/6863-Datatype-on-normal-page-or-UserControl.
Jeroen
is working on a reply...