Saturday, February 18, 2006
Got it working: my new laptop displaying MSDN TV and the .NET show on my old living room TV
Friday, February 10, 2006
Step by step Gantt chart setup
Step 2, we add an instance of the Gantt web part to the page:
Note that the part initially doesn't find a list named "". You must pass it the name of the list it should work with. When you do that it will look like this (check out the message in the web part):
Note that the View field is still empty, but the error message is about a missing start date. The part automatically uses the default view (in this case 'All Tasks'), which does not include the Start Date. So we add it to the view (step 3):
Now, when you enter the right values for the web part (step 4), it will work like a charm:
Now let's do an extra thingy: we create a new view for the list, showing the 'Created By' and 'Created' fields and grouping by the status field:
I added the status field to the list as well. The Group By field must be included in the rendered fields. This may seem odd, but the part needs it. I may fix this requirement, but not right now.
Labels: sharepoint
Wednesday, February 01, 2006
Note to self: how to calculate week numbers in .NET
New version of Gantt part: Group By and Year/Month/Week views
- Group by: if your underlying view uses groupings, the Gantt chart will show these groupings as black grouping containers. The start and end date of the grouping will automatically stretch to reflect start- and enddates of underlying items
- Other time partitionings: several people requested a week or year view. You can now choose between a MonthDay view (where the top bar shows the months and the second row the separate days), a MonthWeek view showing weeknumbers on the second row and a YearMonth view that shows years in the top row and months in the second. This will work better for longer time frames.
Shots
This is the classic month/day view, but now using groupings:
This is the new month/week view. Keep in mind that week numbers are fairly complex stuff and that the outcome depends on the local culture settings of your server. My development server uses Dutch settings and therefore the week numbers in this image reflect ISO week numbering:
And finally the year/month view:
Apart from the really new features, I also added some more robust error handling, preventing the web part to crash when a wrong or misspelled view name is entered. I hope that this will make the part more usable.
Download and Installing
Download the binaries and sources here. Then install the part on your server using the contained dll and dwp files.
Check out this manual for how to install a web part when you have no installer, but only the dll and dwp files.
When configuring the web part, you'll have to manually enter the list name, view name, start date field, end date field, title field and finally the Timebar mode (valid values are YearMonth, MonthWeek and MonthDay).
Labels: sharepoint
How to manually install a SharePoint web part when you have only the DLL and DWP files
When I posted my Gantt chart web part, some people asked for more guidance on how to deploy web parts that don't come with an installer. In my opinion, a professional web part should come with an installer, but sometimes people post samples or demos and don't have the time (or motivation) to build an installer for you and you are stuck with a DLL file and a DWP file. This post describes how you get it to work.
Prerequisites
- You must be administrator on the server running Windows SharePoint Services (WSS)
- You must have a working version of WSS running, obviously
Placing the files in the right folders
You will have downloaded a ZIP file containing at the very least a DLL file and a DWP file. These two files are the bare necessities for installing your web part. In a default WSS installation, you will have a folder C:\Inetpub\wwwroot\wpcatalog. Place the DWP file in this folder. Place the accompanying DLL file in the C:\Inetpub\wwwroot\bin folder.
The new web part will now appear in the catalog when you browse for new web parts, but you have to change some settings before you actually use it.Trusting the part
By default, SharePoint will distrust all DLLs that are placed in its folders. We have to tell SharePoint that our specific web part can be trusted. To achieve this, you open the web.config file in the C:\Inetpub\wwwroot folder. This is an XML file and you must be very careful editing it: when your edit results in invalid XML, the whole WSS system will stop working (if you have no idea what invalid XML is, this post is not for you). Also: every time you save the web.config file, the web server will restart itself (the AppDomain, really). Don't do this casually on a production system. Remember to make a backup of the old web.config. In the XML file, you will find a section <safecontrols> that contains a list of trustworthy web parts. Normally, the web part author will provide you with a snippet that should be added to the list.
Once the web.config is updated, your web part should be ready to roll. Some web parts may need additional steps, but these will then be described in detail by the part's author.
Labels: sharepoint




