This project has moved and is read-only. For the latest updates, please go here.

Clear particular column values in a list using SPUpdateMultipleListItems

Dec 26, 2011 at 7:36 PM


I had a data sheet view in my custom list. I'm planning put a button in that form and once I click on the button then I need to remove one of the column values in that list without asking for any specific condition. I mean to say, it has to take list count and replace the specified column with blank or delete the values which is there previously to that particular column.... 

Below one is my Programmatic approach.. (But I need this one with Client side..)

SPList myList = myWeb.Lists["MyList"];

for (int i == 0; i < myList.Count; i++)
SPListItem myItem = myList.Items[i];
myItem["Value"] = "Some value or blank";

Please suggest me is it possible through Client side using our SPServices....

Thanks in advance !..



Dec 26, 2011 at 7:39 PM
DataSheet view is an entirely different animal. It's an ActiveX control and you can't get "inside" it.

I'd suggest building your own custom form with a DVWP instead. You can display multiple rows and have full control over the display and behavior.

Dec 26, 2011 at 7:50 PM

Thanks for the Quick response sympmarc.

With my curiosity I'm asking this Question.. Is it possible if I had a normal standard view?

Just take an example, in Allitems.aspx page If I wrote my code in document.ready function to this task (with SPServices).. Is it possible ?

Please suggest me...



Dec 26, 2011 at 7:53 PM
Certainly. You can use SPServices to do the updates, but you'll have to write your logic in JavaScript/jQuery, of course.

Dec 26, 2011 at 8:04 PM

You mean to say, catch the Column (in our case Col_3) which is having some value and call SPService to change the column value to Blank. Is it correct ?

If so, then I have worry if I have more values... :(    Correct ?



Dec 26, 2011 at 8:08 PM
You've lost me. SPServices is more of a toolset. You'll need to write your own logic for the functionality you want.

Dec 26, 2011 at 8:34 PM

Thanks for your suggestion sympmarc...