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
Hi Guys,
I created a custom data type with Render Control as dropdown list in umbraco 4.5.
Eg :
Database datatype - integer
Text – New
Value – 30
After I created and published a page with the property set as “New” from dropdown list, it showed in database as below:
<eventStatus><![CDATA[New]]></eventStatus>
What I expected here is 30 so that I can use enum type in c# code to check which one has been selected.
I also tried to set the database datatype – Ntext and Nvarchar, but no luck and they stored the same value as above in database.
Thanks in advance,
Peng
Must use a dropdown, publishing keys as render control to publish the value 30 rather than the text.
Be aware tho that you don't get control over the id value as this is the id of the cmsDataTypePreValues table which has an autonumber key.
Hope this helps.
Regards,
/Dirk
Thanks Dirk!
Its working now.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Cusom data type values were not stored as Integer
Hi Guys,
I created a custom data type with Render Control as dropdown list in umbraco 4.5.
Eg :
Database datatype - integer
Text – New
Value – 30
After I created and published a page with the property set as “New” from dropdown list, it showed in database as below:
<eventStatus><![CDATA[New]]></eventStatus>
What I expected here is 30 so that I can use enum type in c# code to check which one has been selected.
I also tried to set the database datatype – Ntext and Nvarchar, but no luck and they stored the same value as above in database.
Thanks in advance,
Peng
Must use a dropdown, publishing keys as render control to publish the value 30 rather than the text.
Be aware tho that you don't get control over the id value as this is the id of the cmsDataTypePreValues table which has an autonumber key.
Hope this helps.
Regards,
/Dirk
Thanks Dirk!
Its working now.
Regards,
Peng
is working on a reply...