I have implemented this successfuly on a property on one of my DocumentTypes and the data saves to the database. However, when I implement this on a property on a MemberType it doesn't seem to save this value, when the member is saved.
Is there something I am missing for implementing this for use with a MemberType?
It would seem that when the DataType is being used as a property on the MemberType, the SelectedValue on ddlCompanyID is not being maintained on postback for some reason. Yet, as mentioned, it does when used on a DocumentType.
I have managed to work arround this by obtaining the submitted value of ddlCompanyID using the Request object. I have modified the Page_Load function to the following:
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
int selectedCompanyID = 0;
if (Request[ddlCompanyID.UniqueID] != null)
selectedCompanyID = Int32.TryParse(Request[ddlCompanyID.UniqueID].ToString(), out selectedCompanyID) ? selectedCompanyID : 0;
if (MemberCompany.ExistsInDatabase(selectedCompanyID))
umbracoValue = selectedCompanyID.ToString(); }
Custom Data Type value not saving
Hello,
I have created a Custom Data Type similar to the one outlined at http://oshyn.com/_blog/Web_Content_Management/post/Custom_DataTypes_in_Umbraco/.
I have implemented this successfuly on a property on one of my DocumentTypes and the data saves to the database. However, when I implement this on a property on a MemberType it doesn't seem to save this value, when the member is saved.
Is there something I am missing for implementing this for use with a MemberType?
It would seem that when the DataType is being used as a property on the MemberType, the SelectedValue on ddlCompanyID is not being maintained on postback for some reason. Yet, as mentioned, it does when used on a DocumentType.
I have managed to work arround this by obtaining the submitted value of ddlCompanyID using the Request object. I have modified the Page_Load function to the following:
is working on a reply...