1

I'm using SP 2013 on-premises env.On this environment,I have been trying to put a check box in the OOTB document library view.I have some 10 document libraries in my sub sites in my site collection.I have some 100+ sub sites.

2
  • What is the purpose of the chechbox? Jun 29, 2015 at 6:22
  • I want to select multiple documents at once and do some manipulation. Can the default select documents- the tick mark in the default document library - be available through API, I mean, if I select the documents in the default way can I get the ID of these selected items? Jun 29, 2015 at 7:18

2 Answers 2

5

Why create a new checkbox when you can take advantage of the default SharePoint functionality.

var ctx = SP.ClientContext.get_current();
var items = SP.ListOperation.Selection.getSelectedItems(ctx);

for (var i in items)
 {
     alert(items[i].id); //do manipulation here
 }

You do any manipulation with the returned item collection.

2

JSLink is one possible solution for your scenario. Just create a site column and add it to the CType that has been added to the doc libs and write your custom code inside .js file to change the site columns rendering in the view.

Let me know if your have any questions.

1
  • Any source code or links.Appreciate the help Jun 29, 2015 at 6:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.