Interface Widget for Custom Data
I was trying to get the Custom Interface widget when creating a custom field to work. I followed the steps on this post:
www.sitefinity.com/.../using-a-custom-interface-widget-when-creating-a-custom-field.aspx
but am still getting an "Exception
has been thrown by the target of an invocation." when trying to save the
new metafield. I think the error may lie where I put the nulls but I am not sure what values are supposed to go in there. Is there a working example that I could use otherwise?
using System;
using Telerik.Sitefinity.Web.UI.Fields;
using Telerik.Sitefinity.Web.UI;
namespace Telerik.Sitefinity.Samples
[FieldDefinitionElement(typeof(GenericCustomFieldEditorDefinitionElement))]
class AssociatedImage : CompositeFieldControl
protected override System.Web.UI.WebControls.WebControl TitleControl
get throw new NotImplementedException();
protected override System.Web.UI.WebControls.WebControl DescriptionControl
get throw new NotImplementedException();
protected override System.Web.UI.WebControls.WebControl ExampleControl
get throw new NotImplementedException();
protected override void InitializeControls(Web.UI.GenericContainer container)
throw new NotImplementedException();
protected override string LayoutTemplateName
get throw new NotImplementedException();
public class GenericCustomFieldEditorDefinitionElement : Telerik.Sitefinity.Web.UI.Fields.Config.FieldControlDefinitionElement, Telerik.Sitefinity.Web.UI.Fields.Contracts.ITextFieldDefinition
public GenericCustomFieldEditorDefinitionElement(Telerik.Sitefinity.Configuration.ConfigElement parent) : base(null)
public override DefinitionBase GetDefinition()
return null;
public int Rows
get throw new NotImplementedException();
set Rows = value;
public string HideIfValue
get throw new NotImplementedException();
set HideIfValue = value;
public Telerik.Sitefinity.Web.UI.Extenders.Contracts.IExpandableControlDefinition ExpandableDefinition
get throw new NotImplementedException();
Hi ,
Can you provide the stack trace of the error? Also in your classes the methods are not implemented at all.
Greetings,
Ivan Dimitrov
the Telerik team
Hi Ivan,
Thank you for your response. I was actually able to find out how to create custom metafields from this post: