Showing posts with label wss. Show all posts
Showing posts with label wss. Show all posts

Thursday, September 3, 2009

SharePoint 2007 PDF Indexing

This is the best page I could find on how to quickly configure SharePoint 2007 for indexing full pdf documents.

http://www.moss2007.be/blogs/vandest/archive/2007/09/19/sharepoint-2007-and-pdf-indexing.aspx

Thursday, August 27, 2009

Open in Windows Explorer doesn't work on Windows 2008

If you are running SharePoint on Windows 2008 and want to open a document library in Windows Explorer it probably won't work by default. The option is there but it doesn't do anything. To make this work you'll need to add the Desktop Experience feature to the server. You can do this by going into Server Manager, Features, Add Feature and choose the Desktop Experience feature.

Tuesday, March 10, 2009

How to determine if your webpart is providing for others

In my continuation with my webpart for connecting two SPGridViews together I came across the need to determine if the current instance of the part was actually providing for any other webparts. The reason I need to know this is because I wanted to render the first column as a select link if it was providing to another part, but otherwise just render as a standard datacolumn.

Here is the solution I came up with:

 Private Function IsProviding() As Boolean
For Each c As WebPartConnection In Me.WebPartManager.Connections
If c.Provider Is Me Then
Return True
End If
Next
Return False
End Function
Does anyone have another way to determine this?
 



Configuring a SharePoint WebPart as both a Consumer and Provider for the same interface

Recently I’ve been coding a web part that shows a sql query inside a SPGridView and wanted to set it up so it could be a connection provider (ConnectionProvider) as well as a connection consumer (ConnectionConsumer).

For some reason, when I set it up this way the Connections menu used to configure the inbound and outbound connections was greyed out when I had both, but worked if I commented out either one.

It seems that there is an optional argument named “id” for both the ConnectionProvider and ConnectionConsumer decorators and when I provided this argument it started working. It seems there is a default id if you don’t specify it and they must have the same default id.

My code now looks something like this:

#Region "IWebPartRow Provider"
<ConnectionProvider("RowProvider", "DataViewRowProvider")> _
Public Function GetConnectionInterface() As IWebPartRow
Return New DataViewWebPart()
End Function

Public Sub GetRowData(ByVal callback As RowCallback) _
Implements IWebPartRow.GetRowData
callback(oGrid.SelectedRow)

End Sub

Public ReadOnly Property Schema() As _
ComponentModel.PropertyDescriptorCollection Implements IWebPartRow.Schema
Get
Return TypeDescriptor.GetProperties(oView)
End Get
End Property
#End Region
#Region "IWebPartRow Consumer"
<ConnectionConsumer("Row", "DataViewRowConsumer")> _
Public Sub SetConnectionInterface(ByVal provider As IWebPartRow)
_provider = provider
End Sub

#End Region