+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / DocumentFieldElement?

DocumentFieldElement?

4 posts, 0 answered
  1. Kristian
    Kristian avatar
    214 posts
    Registered:
    03 Jun 2010
    11 Aug 2011
    Link to this post
    In the Products module the images in the backend are added using ImageFieldElement, is there an element for Documents?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Aug 2011
    Link to this post
    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 >>

  3. Kristian
    Kristian avatar
    214 posts
    Registered:
    03 Jun 2010
    12 Aug 2011
    Link to this post
    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
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    18 Aug 2011
    Link to this post
    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 >>

4 posts, 0 answered