DocumentFieldElement?

Posted by Community Admin on 05-Aug-2018 14:12

DocumentFieldElement?

All Replies

Posted by Community Admin on 11-Aug-2011 00:00

In the Products module the images in the backend are added using ImageFieldElement, is there an element for Documents?

Posted by Community Admin on 11-Aug-2011 00:00

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

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Posted by Community Admin on 12-Aug-2011 00:00

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

Posted by Community Admin on 18-Aug-2011 00:00

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

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

This thread is closed