DocumentFieldElement?
In the Products module the images in the backend are added using ImageFieldElement, is there an element for Documents?
Hello Kristian,
There isn't DocumentFieldElement. You can use HtmlField which allows you to insert dynamic links from Images and Documents module or use a custom field element or one of the built-in control bind to source of document data ( for example ChoiceField).
Kind regards,
Ivan Dimitrov
the Telerik team
I can't add an HtmlField() to a ContentViewSectionElement, only a HtmlFieldElment() how would I add this dynamic link in the code? This is what I have
var termsAndConditionsDocField =
new
HtmlField()
ID =
"termsAndConditionsDocFieldControl"
,
DataFieldName =
"TermsAndConditionsDoc"
,
DisplayMode = displayMode,
Title =
"TermsAndConditionsDoc"
,
CssClass =
"sfFormSeparator sfTitleField"
,
ResourceClassId =
typeof
(MyModuleResources).Name,
WrapperTag = HtmlTextWriterTag.Li
;
termsSection.Fields.Add(termsAndConditionsDocField);
// Can't add here
Hi Kristian,
Filed elements are used in definitions only. You can use HtmlFieldDefinitionFacade and its method AddHtmlField or AddLocalizedHtmlField
sample
fluentMainSection.AddLocalizedHtmlField("Content")
.SetId("contentFieldControl")
.Done();
Regards,
Ivan Dimitrov
the Telerik team