Get selected items in a list sharepoint 2010 | SharePoint 2010 Programming | SharePoint Forum

Please consider registering
guest

Log In Members

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Get selected items in a list sharepoint 2010
August 26, 2010
5:34 pm
steve
Guest

Hi,

 

great site must say

I need a code for getting the selected items for a list and modifying it . I need to get it using sharepoint 2010 OM

August 30, 2010
3:07 am
Admin
Forum Posts: 255
Member Since:
May 30, 2010
Offline

use getSelectedItems() function

 

if you need an example of client object model see http://www.learningsharepoint……t-library/

September 5, 2010
5:47 pm
srinivas
Guest

ClientObject model

var ctx = SP.ClientContext.get_current();
              var items = SP.ListOperation.Selection.getSelectedItems(ctx);
              var myItems = '';
              var k;
              
              for (k in items)
              {
                myItems += '|' + items[k].id;
              }

June 7, 2011
2:14 pm
Raghu
Guest

example –

var currentlibid = SP.ListOperation.Selection.getSelectedList();

var currentLib = web.get_lists().getById(currentlibid);

var selectedItems = SP.ListOperation.Selection.getSelectedItems(context);
var count = CountDictionary(selectedItems);

for(var i in selectedItems)
{

var currentItem = currentLib.getItemById(selectedItems[i].id);
context.load(currentItem);

}

/2011/05/28/sharepoint-2010-ecmascript-copymove-files-to-another-document-library-part-2/

December 17, 2013
3:07 pm
Ben
Guest

Trying to update a field value for all items in a list when field value is exactly "new". Here's the concept:

If field(export) is exactly "new":
Change field to "Complete"
Else:
Pass

No idea how to implement this in javascript.

Forum Timezone: UTC 0

Most Users Ever Online: 93

Currently Online:
27 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Member Stats:

Guest Posters: 978

Members: 16882

Moderators: 0

Admins: 1

Forum Stats:

Groups: 3

Forums: 10

Topics: 1271

Posts: 2412

Administrators: Learning SharePoint (255)

Disclaimer: The contents of this site are provided “AS IS”. Information and views expressed including URL(s) and other Internet website references, may change without notice. You bear the risk of using it. SharePoint, MOSS, SharePoint 2010, SharePoint 2013 and Microsoft are trademarks of the Microsoft Corporation.Learning SharePoint only provides Tips,Tricks and Tutorials for using Microsoft SharePoint, Microsoft Office and related Softwares.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.