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 —

   

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: 102

Currently Online:
17 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