Some of you may be wondering why I have not posted in a couple of days. Well, there was the weekend, and then I started working on a set of two web parts that I want to publish here. I will keep them as a surprise, but I promise they will be open source if you promise not to send it to the http://thedailywtf.com!
Meanwhile, I will tell you about a couple of things I discovered while working on these web parts:
- I wanted to create two web parts in one DLL. This seems to be an easy task - exactly like making one web part - just add another class, inherit from "webpart" and make sure its has the same namespace and make sure that you register it as safe. Sounds easy right? Well - I managed to waste two days trying to make this work (and this should go to http://thedailywtf.com) because I didnt notice that the second class I added didnt have the "public" declaration (this is the default for a new class in visual studio). So I tried and tried and tried, and finally the good MVP Daniel Larson helped me find the small mistake.
This is something new for developers - fields in lists now have new properties in the object model :
- While we are at it - another nice addition to the field object "GetFieldValueForEdit". I dont know yet what it does, but I have my suspicions!
- Ahhh, this is a great one- "FieldRenderingControl". Again, no documentation and I had no time, but I think this is going to be a huge time saver for all of us developers who need sometimes to write alternative input forms for lists. Just think about it - the field contains the information of which control to use. I will have to check tomorrow how it works exactly with the default field types since it returns a "sharepoint webcontrol" and not a regular "web.ui control". I will update. (save me some time if you know - post a comment!)