.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Bulk update on a list for all versions

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :C#


I have a list with items with the list items having multiple versions

I want to do a bulk update on my list which will add a column with a default value. I can do it using code but I want this to happen for all the versions of the list items. Currently it is happening only for the latest version of the list items. Has someone done it or is it even feasible ?


Thanks !


View Complete Post

More Related Resource Links

Concurrent update in sharepoint list item



How the concurrent for sharepoint list item are are handled.

if two or more users are working on same item. Then how sharepoint process multiple update request for particular list item.

List views for versions



We have a list with versioning enabled. When an item is edited a new version is created for the particular item.
Is it possible to create a view to list only a particular version of items and data in that version?


Problem with list controls and update progress template



I have an update panel that surrounds a wizard control which I use in conjunction with a update progress control. Now my update progress control works perfectly, with my animated gif and div tag that lays over my wizard control when the user goes from step to step. However, there is a problem that I am struggling to solve. A number of my steps use controls like list boxes, and when the update progress control fires, the list control is not laying underneath my div an animated gif no matter how high a make my css z-index on the div.

Does anyone have a way of solving this?


.net update - current list

Is there a list of applicable updates for .net 2.0sp2, 3.5sp1, 4.0 ? Thanks  

Update SharePoint List item using UpdateListItem web service with javascript

I'm using the Custom_AddListMenuItems function in a CEWP to add a menu item to each list item to Archive that item. This is achieved by updating a choice field in the item to 'Archived'. I'm trying to do this using the web service UpdateListItem web service to update the item using Javascript, but I can not find the correct code that updates the list item. I'm using this code:     var ctx=currentCtx;     var ciid=currentItemID;     var xmlHttp=null;     if (confirm("Are you sure you want to Archive this item?"))     {         var soapRequest = '<?xml version="1.0" encoding="utf-8"?>'+             '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+             '    <soap:Body>'+             '        <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+         

Bulk amount of data in List

Hi All, I got a requirement that to display bulk amount data in a List (Around 50000 items). Can any one of you suggest me best performance way?(Displaying this amount data would definitely leads to performance issue). Let me know if you have any Queries.   Regards, Kumar.

ComboBox Display list does not update if a datasource is a boxed string

I have a combo box databound to a BindingSource bound to a List<Holder> it has Holder.Name as its display value. I also have a text box bound to Holder.Name but if I change the text in the text box it will not change what is displayed in the combo box. Changing selected items and changing back will show the updated text in the text box but will still have the old value displayed in the combo box. How do I make the item in the combo box update? namespace Sandbox_Form { public partial class Form1 : Form { public Form1() { InitializeComponent(); lstBroken = new List<Holder>(); lstBroken.Add(new Holder("test1")); lstBroken.Add(new Holder("test2")); bsBroken = new BindingSource(lstBroken, null); cmbBroken.DataSource = bsBroken; cmbBroken.DisplayMember = "Name"; txtBroken.DataBindings.Add("Text", bsBroken, "Name"); lstWorks = new List<string>(); lstWorks.Add("test3"); lstWorks.Add("test4"); bsWorks = new BindingSource(lstWorks, null); cmbWorks.DataSource = bsWorks; txtWorks.DataBindings.Add("Text", bsWorks, null); } } public class Holder { public Holder(string name) { Name = name; } public string Name { get; set; } } }

doing bulk update

Hello Everyone, I have a gridview. users can update the database using this gridview. There are about 10 columns and 60 rows in this gridview and once the user makes the changes to a particular row, there is an update button on that row and user can click that button to update the changes that he/she made. My boss wants to remove the update button from each row and put the button at the bottom of the gridview. he says that I will make the changes to whatever rows, I want to make the changes to and then hit the update button that is at the bottom of the grid and it should make the changes to all the rows in the database. I can accomplish this by opening the database coonetion and making a call to the database several times and updating row one by one or I can do all bulk insert. how can I acheive this bulk insert because the other option is quite expensive. Please let me know if anyone has any ideas. Thanks in advance  

Invalid data has been used to update the list Item.(List definition)

<nativehr>0x80070057</nativehr><nativestack></nativestack>Invalid data has been used to update the list item. The field you are trying to update may be read only. I have created a list definition and into that i have created lookup column when i am trying to add any item into the list then it gives me an error as above. Can anyone help me.? I made the readonly attributes to false for lookup columns.  

How to update selected item state in the list box by clicking a button?

I created a listbox menu to browse through content by clicking items in the listbox. I also created ‘back’ and ‘forward’ type of navigation to browse through the same content based on the browsing history. I load content into frame and accessing the browsing history with NavigationCommands.BrowseBack and BrowseForward Properties. It is working great. However, I need to indicate a selected state of the listbox item related to the content shown in the frame while browsing with Back/Forward buttons. I have a hard time binding that property. What is the correct way to bind selected state of the listitem in this case? Thank you in advance. XAML: Button <Button x:Name="NavBack" Content="" HorizontalAlignment="Left" Margin="20,0,0,0" Style="{DynamicResource BackButtonStyle}" VerticalAlignment="Top" CommandTarget="{Binding ElementName=ContentFrame}" Command="{x:Static NavigationCommands.BrowseBack}" SnapsToDevicePixels="True" IsEnabled="{Binding CanGoBack, ElementName=ContentFrame, Mode=OneWay}" > XAML: Listsbox <ListBox x:Name="Nav_ListBox" Margin="0,18,0,0" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Background="#FFF2F2F2" ItemsSource="

How to prevent automatic update from sharepoint list on Infopath 2007 form

Hi there, I've got an Infopath 2007 form on MOSS 2007. I have a custom list in sharepoint and the infopath form has a data connection to that list to receive data. Is there any way to prevent automatic update on the values in the form that is received from the list. I'd like the new form to have updated info received from the list. However, the old/existing forms that were created should have the data that were available at the time when the form was created. Let me know if this is not clear and I'll try to explain more. Thanks,Pman http://www.pmansLab.com/

Query DB and update Check Box List on JS/jQuery Function

Hey guys.  I'm not sure if this is the right forum to post this in but I've come to a roadblock in my app and I'm not sure which way I should go.  Currently, I have a slider control and two text boxes used to set the Start and End times of a section of a video.  Let's say the video is of some Music Awards.  In my database, I've tagged the start and end time of each celebrities on-screen appearance.  When the user adjusts their start and end times on the page, I want to query the database table and pull back all celebrities within that range.  The problem is I don't know how to do this in JS.Can I use the Check Box List and bind the values to it?  Do I need to render a table of Check Boxes in JavaScript?  Do I call the Server-Side code via Ajax and then partially render the page?Any help, comments or suggestions would be great.

Invalid data has been used to update the list item in sharepoint 2010.

I have created a custom list definition with one lookup field <      Field ID="{865CD714-7DF6-4F65-9DBC-5FE910B10BC5}" Name="CompanyName" DisplayName="Company Name" Group="Custom contents" Description="Select Company" Type="Lookup" ShowField="CompanyName" Required="FALSE" FieldRef="CompanyName" List="Lists/LookupListDefinition-ListInstance1" ReadOnly="FALSE"></Field>   <nativehr>0x80070057</nativehr><nativestack></nativestack>Invalid data has been used to update the list item. The field you are trying to update may be read only. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. My solution is perfectly get deployed on site. I can see the list instance created on site its also appears on quicklaunch. When i am trying to add the item into the custom list using UI then i am getting the input form correctly i can see the lookup values in dropdown list but when i click on save button then its give me an error as mention above. For debugging purpose i have created the event reciver class for list item adding event. In that i have check the column status and

Client Object Model : Transactional update of list and content types

I am using Silverlight client object model to code against Sharepoint. Essentially, what I want is that when a user clicks a button, An item needs to be added to a list and also a new content type has to be created. button1_click() { //1. Create an item in a list. //2.  Create a new content type. } Also this should be transactional:  only if item is added should the content type be added too, otherwise roll back both. (and vice-versa). My understanding of client object model is that we at the core we are talking to Sharepoint WCF services. So if I say, using(TransactionScope scope = new TransactionScope()) { ClientContext.ExecuteQueryAsync(); scope.Complete(); } can I assume that the updation will be transactional??

Cannot update Extenal list from worflow in Sharepoint 2010

Hi, I try to update an external list from a step in worflow; I did in Sharpoint Designer. I did that: 1. I create a List and put one field from my external list 2. In the action I chose: Update list item 3. In the drop down list I chose: External List 4. In the find the list Item: I look for my ID in my external list and past this value for current Item. 5. I published this workflow 6. I ran this workflow in my list But when I running in my list and finish: This workflow don't upated my external list and write in the log: Error.  :( What can I do. The user have permision in my list and in my external list too for write and read (full control),

Update custom list of sharepoint using web service

I need update an colunm of list sharepoint using web services. The code used is: private void button1_Click(object sender, EventArgs e)         {             try             {                   WSLists.Lists listService = new Lists();                 listService.Credentials = new System.Net.NetworkCredential("Usuario1", "Password", "Dominio");                 System.Xml.XmlDocument doc = new System.Xml.XmlDocument();                 System.Xml.XmlNode ndListView = listService.GetListAndView("LIST_Test ", "");                 string strListID = ndListView.ChildNodes[0].Attributes["Name"].Value;                 string strViewID = ndListView.ChildNodes[1].Attributes["Name"].Value;         

How to update List Items with LINQ?

In the code below, the For Each will loop through the list and populate the ListBox.  When I add "item.LeadTime = 5" to try updating an item, Visual Studio says that it is ReadOnly.  Any ideas on what's wrong or missing from the code? Dim spWebUrl As String = SPContext.Current.Web.Url Dim dc As New MyDataContext(spWebUrl) Dim Asgns = From a In dc.GetList(Of AssignmentsItem)("Assignments") Select a.LeadTime, a.Frequency For Each item In Asgns      ListBox1.Items.Add(item.Frequency)      item.LeadTime = 5      dc.SubmitChanges() Next  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend