Populating drop down data type from a custom sql table Options
acl
Posted: Tuesday, November 20, 2007 2:26:21 AM
Rank: Devotee

Joined: 12/15/2006
Posts: 40
Is there a way to populate a drop down data type from my own sql table (preferably via a stored proc)?
tim
Posted: Tuesday, November 20, 2007 9:38:17 AM

Rank: Addict

Joined: 2/19/2007
Posts: 738
Location: Belgium
Sure that is possible, take a look at this example:
http://codegarden.umbraco.org/blog/2007/5/11/we-just-build-an-ftp-datatype-in-45-minutes

All you need to do is create an own datatype.

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
acl
Posted: Wednesday, November 21, 2007 1:37:12 AM
Rank: Devotee

Joined: 12/15/2006
Posts: 40
OK Cool I worked it out. There doesn't seem to be any documentation on this out there, so if anyone is trying to work it out and is lucky enough to stumble upon this forum post -

First I created a user control that inherits from umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor.

Then I created a new data type in umbraco using the "umbraco usercontrol wrapper" as the "rendercontrol". After clicking "save", a new field is revealed that allows you to choose your user control.
tim
Posted: Wednesday, November 21, 2007 9:19:19 AM

Rank: Addict

Joined: 2/19/2007
Posts: 738
Location: Belgium
Well it's pretty straigth forward once you see the example, but indeed some documentation would be nice.

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.