locked
Adding a Select all Check box to a dataview RRS feed

  • Question

  • I want to add a Select all Check box to a dataview in SharePoint. Where if the user select the select all checkbox, all checkboxes will automatically

    Michael L. Williams

    Sunday, April 15, 2012 7:48 PM

Answers

All replies

  • Not sure thats doable with custom views.  The datasheet views is (as best I know) an Active X control, which means coding would almost certainly be involved.

    You can use keyboard short-cuts though.  Ctrl-A works a treat.


    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/

    Sunday, April 15, 2012 8:01 PM
    Answerer
  • Shouldn't it be doable with JQuery or JavaScript

    Michael L. Williams

    Sunday, April 15, 2012 8:42 PM
  • Shouldn't it be doable with JQuery or JavaScript

    Michael L. Williams

    JQuery and JS manipulate SharePoint pages typically via the DOM and is done client side.

    Customisations to the Data Sheet View are not supported, as this is generated using the Microsoft Office Access Web Datasheet Component, which renders the grid using the same base engine as the data sheet view that Microsoft Access uses.

    You MAY be able to do this via the DVWP but that falls outside my sphere of knowledge and is something that I can´t comment on.


    Steven Andrews | SharePoint Professional | http://www.twitter.com/backpackerd00d | https://baron72.wordpress.com/

    Sunday, April 15, 2012 9:03 PM
    Answerer
  • Mike,

    Are you using a dataview (DVWP) or a datasheet view that's available out of the box? From your screenshot, it seemed to me that you're using a dataview but after going through this thread, I'm not sure...

    If it is a dataview that was created using SharePoint Designer, then I believe it should be doable; by using javascript. But, can you first confirm what kind of view it is that you're working with?


    Pman
    http://www.pmansLab.com/

    Sunday, April 15, 2012 11:46 PM
  • Hello Pman,

    It's a Data View that I added through Designer. I hope it's a simple way to do it by adding a content editor webpart with javaacript.

    Mike


    Michael L. Williams

    Monday, April 16, 2012 12:45 AM
  • Hi Mike,

    Since it's data view created using Designer, I think a simple javascript will do the trick for you and you can either add it using a content editor webpart or have it incorporated within the data view source code.

    I didn't make something like this. So, can't share any examples, but I don't think it would be too complicated. Have you used the IE Developer toolbar yet? When you check that page on the browser, that add-on will allow you to check the html node patterns for the check-box input. You can either write your raw javascript or use jquery to toggle the checkbox selection.


    Pman
    http://www.pmansLab.com/

    Tuesday, April 17, 2012 2:54 AM
  • I haven't used the IE Developer toolbar yet. We can't download any add-ons as well. I'm not that good with JavaScript.

    Michael L. Williams

    Tuesday, April 17, 2012 11:54 PM
  • You might not need admin rights for installing that add-on. Besides, it's for developing purposes. So, I think you have a valid case.

    Anyways, here's something I found through another forum that comes close to what you're trying to do, though not exactly. But, may be this could be a starting point.

    http://sharepointjavascript.wordpress.com/2010/02/25/add-invert-check-all-and-uncheck-all-to-a-multichoice-checkbox-column-or-the-entire-form/

    Unfortunately, I've been very busy at work recently and don't think I'll be able to try this out myself anytime soon. Otherwise, I could try write the javascript code. If anybody else has done something like yours, hopefully they can share it with you here.


    Pman
    http://www.pmansLab.com/

    Wednesday, April 18, 2012 2:38 AM
  • I just want one select all check box up top, not a invert all link. Thanks.

    Michael L. Williams

    Friday, May 9, 2014 8:57 PM