Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Editcontribution - editform - adapt generated edit controls (rows of document attachments) View modes: 
User avatar
Member
Member
m.illien@endurit.com - 12/14/2011 2:46:18 AM
   
Editcontribution - editform - adapt generated edit controls (rows of document attachments)
My editcontribution in editmode shows my document which has a documentfield of type documentattachments.

this shows automatic a unigrid with the action buttons in editmode.

now how can I adapt this control? I like to hide the delete action button, the row with the file size and so on.. I already copied the usercontribution webpart and the editform inside.

there is the cmsformcontrol inside
<asp:Panel runat="server" ID="pnlContent" CssClass="editform">
<cms:CMSForm runat="server" ID="formElem" Visible="false" CssClass="UserContributionForm"
HtmlAreaToolbarLocation="Out:CKToolbarUC" ShowOkButton="false" />
</asp:Panel>

So is it possible to handle the generated controls (the unigrid which shows the documentattachments) from this file (CMSModules/Content/Controls/customfolder/MyCopiededitform.ascx)?

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 12/14/2011 7:38:45 AM
   
RE:Editcontribution - editform - adapt generated edit controls (rows of document attachments)
Hi Marc,

Well, the documents attachment form control can be found in ~\CMSModules\Content\Controls\Attachments\DocumentAttachments\ location and is using UniGrid internally, so here you can find information on how to customize the UniGrid control on your own:

http://devnet.kentico.com/docs/controls/unigrid_getting_started.htm

Basically, it would be about modification of ~\CMSModules\Content\Controls\Attachments\DocumentAttachments\DocumentAttachmentsList.xml file in your case.

It is possible to access any form control from CMSForm control, that is not a problem with Kentico CMS API, but the only problem in case of DocumentAttachments control is that you would need to customize it and expose some additional properties to this form control (like for example UniGrid) in order to elegantly work with it.

Best regards,
Miro