Enable or disable custom ribbon button in SharePoint 2010
My prevoius posts(here and here) described how to create a custom ribbon action and how to retrieve selected list items in SharePoint 2010. Right now I’ll show You one more thing that can be usefull while creating Your own ribbon buttons – how to enable or disable ribbon button using defined by You conditions. Continue reading
Get selected items from SharePoint 2010 list
Fetching selected list items in SharePoint 2010 is very simple. To achieve such a functionality You can use Custom Ribbon Button. In this example I will use the code from my previous post on creating custom ribbon button. Continue reading
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.
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.
SharePoint SPItemEventReceiver
Preventing browser from cachning ASPX or ASCX content
Caching content by the browsers can be sometimes very annoying. I had problems with it, mostly when I was developing some popup modal dialogs which showed aspx or ascx controls.
Thankfully, there is very simple solution how to disable content caching. You achieve it in two ways:
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).
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.

