I came across some strange behavior of the Sharepoint Object Model (OM) when adding a new column (field) to the default view of an existing list.
Surprisingly (or not
) the following code snippet doesn’t seem to work:
list.DefaultView.ViewFields.Add(ACCOUNT);
list.DefaultView.Update();
But what you say if the following one is working:
SPView defaultView = list.DefaultView;
defaultView.ViewFields.Add(ACCOUNT);
defaultView.Update();
Let’s take a closer look in debugger to see what happens when running this code:
The first print-screen displays the current properties of the default view object:
The following image display the properties of the defaultView object :
Looks like the SPView defaultView = list.DefaultView code line makes a copy of the default view. The defaultView has different fields after this step:
Update method seems to synchronize the information with the real view object (tried to see Update method with the reflactor but it is obfuscated):


Nice site design , what is the name of tamplate you used in your blog
Hi, i must say fantastic site you produce, i stumbled across it in Yahoo. Does you get much traffic?
Should there be another persuasive post you can share next time, I’ll be surely waiting for it.
Set your own life more easy get the business loans and all you want.
I read your articles and get a lot of info that I never know before. It’s hard to find knowledgeable people on this topic, but you sound like you know what you’re talking about!
Thank you for such a informative blog. Where else could anyone get that kind of information written in such an incite full way? I have a project that I am just now working on, and I have been looking for such info.
You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang of it!
Have you ever considered adding more videos to your blog posts to keep the readers more entertained? I mean I just read through the entire article of yours and it was quite good but since I’m more of a visual learner,I found that to be more helpful well let me know how it turns out! I love what you guys are always up too. Such clever work and reporting! Keep up the great works guys I’ve added you guys to my blogroll. This is a great article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.
Thank you for another fantastic blog. Where else could I get this kind of info written in such an incite full way? I have a presentation that I am just now working on, and I have been looking for such information.
I just cant stop reading this. Its so cool, so full of information that I just didnt know. Im glad to see that people are actually writing about this issue in such a smart way, showing us all different sides to it. Youre a great blogger. Please keep it up. I cant wait to read whats next.
I came across your article, i think your blog is awsome, keep working !
Some of the images were not displaying correctly but, the site still looks great. I’ve been visiting this site for a few weeks now and i’m really impressed with the content. What is the RSS address?
Howdy! My class suggested a parser in your web page so our organization can certainly aggreate your great information, with recommended attribution obviously, just there seems to be an error. The blog isn’t granting us to. May easily you advice us?
citisem si pe blogul lui arhi o chestie asemanatoare zilele trecute si chiar ma gandeam ce opinii ar putea avea alte persoane
Republicans say the bill would hurt the economy by ugg boots sale burdening businesses with a thicket of new regulations. They also point out that it ducks the question of how to handle troubled mortgage finance giants Fannie Mae and Freddie Mac, which Democrats
plan to tackle next year.
I’ve been visiting your blog for a while now and I always find a gem in your new posts. Thanks for sharing.
A friend posted this site on Facebook. I tried it just to see, but I found many of value here. Thank you! I love it when there are good posts, blogrolls and things to entretain me. Just stumbled it, hope you get a few extra visits for that! Have a good weekend!
thanks for the post. I am very happy to read this post. . . . .
I have been visiting variousblogs for my dissertation study. I have found your blog to be fairlybeneficial. Keep updating your blog with usefulinformation… Regards
In case you are just examining this comment without looking at this post then make sure you do that !?! This is really a well completed and directly for the stage article! Thank you !!
Thanks for taking the time to discuss this, I feel strongly about it and love reading more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.
I really like your site and i really appreciate the excellent quality content you are posting here for free for your online readers. Can you tell us which blog platform you are using?
Hi! My group used a bot crawler in your wordpress bog so our organization may easily aggreate your great articles, with recommended attribution however, although there seems to be an error. The ?nternet site is simply not just letting us to. Can certainly you assist us?
norm? Is simply this specific in creative commons?
Thank you very much this is a very nice information!. . . . . .
I do agree with all the ideas you have presented in your post. They are very convincing and will definitely work. Thanks for the post.
Can I website link as much as this, through my internet page? I’m likely to gather as much reasons for information and facts as i am able.
I agree with you and it also certainly likely to guide lots of people.
Have found your web page. My pal mentioned it to me before, yet never got around to checking it out until now. I must express, I’m floored. I really enjoyed reading through your posts and will absolutely be back to get more.
Should there be another persuasive post you can share next time, I’ll be surely waiting for it.
Have found your web page. My pal mentioned it to me before, yet never got around to checking it out until now. I must express, I’m floored. I really enjoyed reading through your posts and will absolutely be back to get more.
Have you ever considered adding more videos to your blog posts to keep the readers more entertained? I mean I just read through the entire article of yours and it was quite good but since I’m more of a visual learner,I found that to be more helpful well let me know how it turns out! I love what you guys are always up too. Such clever work and reporting! Keep up the great works guys I’ve added you guys to my blogroll. This is a great article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.
Thank you very much to share this good software to use!
thanks for the post. I am very happy to read this post. . . . .
This is a great article thanks for sharing this informative information.. I will visit your blog regularly for some latest post.
I enjoyed reading your interesting yet very informative insights. I am looking forward to reading more of your most recent articles and blogs.
wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated.
Its very informative and interesting article.all the points are very useful. Simple but very effective writing. Thanks for sharing such a nice post.
Hey let me say a big thank you !?! I loved this article and I cant wait for additional concerning the same subject! Hopefully you may write more about this !?!
Thanks for the read, I will bookmark it and come back later to check out some of your other posts =)
I thought it was going to be some boring old site, but I’m glad I visited. I will post a link to this page on my blog. I believe my visitors will find that very useful.
I wanted to thank you for this great I definitely loved every little bit of it. I have you bookmarked your site to check out the latest stuff you post.
awesome post. I have discovered for myself just how flexible WP is, as a hosting platform for your website. you literally have everything you need to publish a website at your fingertips, through WordPress. thanks.
I hope its not the last post about this topic , it had been just a fantastic understand and hopefully we will all examine a lot more about this ! Bookmarked dude!
Good read. Like your blog design too.
Thanks for writing such a thought-provoking post. Let’s keep the comments relevant.
Hello there , thanks to the wonderful topic , I hope I can study much more and enjoy … it had been so helpful
Great post. I’ve been looking for this exact info for a while now. I’ll bookmark it in the public bookmarking sites to get you more traffic
Nice post very helpful post. I will definitely get back again to this site later on to read some of other entries. Thanks!
Whoa, awesome read. I just now found your web site and am already a fan.