The answer might be simple. The first time a column is created and you title it “Column1″ the database records that. If you (or someone else) later changes the column title to “Column2″ your application will break. Why? Because behind the scenes that column is still “Column1″
This video will demonstrate how to populate a asp.net drop down list control with SharePoint list column values. I’ve created a visual web part in Visual Studio 2010 and used the sever object model to demonstrate this. However, you can populate a drop down list with the client object model if you prefer.
- Finds the list “My Tasks”
- Gets all items from the “Title” column in the “My Task” lists
- Uses a foreach loop to add all of the “Title” columns values to a drop-down.
Watch the video to see how it works.
InfoPath 2010 repeating tables are useful and sometimes even essential to the project requirements. However, they carry with them some problems. For one thing when multiple values are entered into an InfoPath 2010 form all of the values become crammed into one SharePoint 2010 column. This will cause all kinds of problem down the road if you ever need to access that Info and/or filter it etc. So the following example shows how to move the repeating table values to a separate list where the values can be more efficiently managed.
- I’ve created a Visual Studio 2010 visual web part that fires the code on page load
- You must have a delimiter to separate the values. In this case I have used a ;
- Do NOT add a ; to the last repeating table entry. If you do you will have and extra record in the new list.
How does it work? View the Video below:
Sooner or later the time will come when you will need to use a console application to complete
some type of task in SharePoint 2010. For instance you might need to merge data from
one list into another list using C#. However before you can start coding you need to set up the
the console app to interact with SharePoint 2010. The following video demonstrates how.
NOTE: This will not work for SharePoint Online
The web server process that was being debugged has been terminated by Internet Information Services (IIS)
Recently I was working on a project that required some debugging. I found myself getting the following error. Watch the video to see how I “fixed” the problem.
At a client recently, my development colleague was struggling to find out how to set a field attached to a custom Content Type in a list to be hidden to aid in document management (so it is not shown in the Document Properties panel in Microsoft Word).
The following post seemed to suggest an unofficial way:
However, we try to keep things in a supported model if possible.
Through further looking he came across the following property:
- After further playing in code, he managed to crack it with the “.hidden” method.
- Code Example:
This code will set the Hidden flag (same as you can through the UI) against the document library. The above iterates through a List of strings which contains the fields i want to hide.
NB: Please not that this works because we are using our own content type attached to the library.