Tomasz Rabiński | zavaz Blog

C# SharePoint VSTO

SharePoint 2010 Custom Ribbon Button

Ribbon in SharePoint 2010 comapring with previous versions of SharePoint is a big change and a vast improvement in the GUI. When You use it for the first time it can be a bit confusing, but You should get used to it very quickly. Very nice function implemented in the newest version of SharePoint is ability to customize nad create Your own Ribbon Buttons. To create such a custom button You have to create a new Feature and deploy it on the SharePoint server. Continue reading

SharePoint and NHibernate – problem with NHibernate.ByteCode.Castle.dll

I often use NHibernate to work with SQL database. It’s a very mature ORM solution for .NET which allows You to freeley “talk” with any database. Although, this is very simple ORM, sometimes I have some challanges I have to face.

One of the first issue I had with this ORM was:

Could not load file or assembly ‘NHibernate.ByteCode.Castle’ or one of its dependencies. The system cannot find the file specified.

Continue reading

SharePoint 2010 Developer Dashboard

Developer dashboard is a new feature in SharePoint. It provides to developers and administrators performance and tracing information that can be used to debug and troubleshoot issues with a page rendering time. The dashboard is turned off by default but it can be enabled through C# code, stsadm or powershell command and it can have three states: On, Off, OnDemand. First two should be clear. Third one means that SharePoint will show an image button next to Your login name on a page with which You will be able to show or hide the developer dashboard.

Continue reading

The List cannot be displayed in Datasheet view Error

I often use Datasheet view in SharePoint to manipulate the data from the list. Few times I’ve met with the error “The List cannot be displayed in Datasheet view” when I tried to open the “excel” view.

This can be caused by an Office 2010 64-bit version installation on the local PC or even by the SharePoint Designer 2010 and happens only in Windows SharePoint Services 3.0(WSS) and Microsoft Office SharePoint Server 2007(MOSS).

Continue reading

Custom Exceptions Handling

In this post I’ll show how I handle exceptions in the projects I develop.

Some time ago I wrote a simple class which turned out to be very useful in exception handling and displaying it to the user. To use it You have to create a new instance of it and add it to the controls collection on the page. Then You can just add exceptions, through the appropriate method, which will be rendered as a HTML table. The class uses Render event to check if any exception has been added, if so the class renders appropriate HTML code which is shown to the user.

Continue reading