Display custom colunmn in Document Library default grid

Sanket Saxena asked on March 10, 2014 02:32

Hello,

I have added a folder and added some documents (CMS.File) and using the document library webpart i display on a page and it is working fine.

My requirement is i have added 2 new fields in the CMS.File "SubmissionDeadline" (date time) and "SubmissionForm" (text).

But currently it displayed the "Document Name" , "Modified" and "Workflow step".

I would like to display SubmissionDeadline and SubmissionForm also on the header with the values. How can i achieve that.

Recent Answers


Jan Hermann answered on March 10, 2014 04:03

Hello,

You need to customize the Document library web part, so in the \CMSModules\DocumentLibrary\Controls\DocumentLibrary.xml file please add your custom column like:

<column source="NodeGUID" externalsourcename="someFlag" caption="MyField" wrap="false" />

You need to also add the someFlag case into the gridDocuments_OnExternalDataBound method of the \CMSModules\DocumentLibrary\Controls\DocumentLibrary.ascx.cs file.

Best regards,
Jan Hermann

0 votesVote for this answer Mark as a Correct answer

Sanket Saxena answered on March 10, 2014 04:53

I have added the new columns SubmissionDeadline and SubmissionForm in CMS.File Document Type.

So did the below will work?

What is this this someFlag value(externalsourcename) what kind of value it holds?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 11, 2014 06:39

You might check out the dev docs on the UniGrid. OR this overview by Helena at Kentico.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.