January 30, 2008 - 11:00, by Steven Van de Craen
Categories: General
Thought I'd promote the upcoming TechDays 2008 event (previously the Developer & IT Pro Days) in Ghent. Three days packed with loads of presentations about upcoming technologies and releases.
Find out about the program, speakers and more on the following site:
http://www.microsoft.com/belux/heroeshappenhere/
Here's me wearing that geeky shirt this morning (Not fully awake either) !
January 24, 2008 - 10:14, by Steven Van de Craen
Categories: .NET, SharePoint 2007
I may have found a bug in the SPTreeView control. When you select a node the CSS class declared in the SelectedNodeStyle isn't applied to the node. Other than that it seems to behave correctly.
Sample markup (in a LAYOUTS page)
<wssuc:InputFormControl runat="server" LabelText="Folder:">
<Template_Control>
<SharePoint:SPTreeView id="tvFolder" runat="server" OnLoad="GetFolders" ShowExpandCollapse="False" OnSelectedNodeChanged="RefreshPositions">
<NodeStyle CssClass="ms-vb-user" />
<SelectedNodeStyle CssClass="ms-tvselected" />
<HoverNodeStyle CssClass="ms-tvselected" />
SharePoint:SPTreeView>
Template_Control>
wssuc:InputFormControl>
Because of this it might be better to use the ASP.NET TreeView control. In the above sample the only thing that needs to change is to
January 19, 2008 - 10:05, by Steven Van de Craen
Categories: General
I had an issue for some time now where I could not add new USB Plug & Play devices (memory sticks, hard drives, camera's, etc). Devices that were added before the problem occurred still functioned properly, just the new ones wouldn't install.
I tried:
- Changing stuff in the registry (values, permissions)
- Copied the drivers.cab file from the Windows installation disc
- Removed *all* USB hardware in Device Manager and let Windows reinstall it upon reboot
Finally the solution was to restore the usbstor.inf file that had gone missing in the C:\Windows\inf folder.
F:\>cd I386
F:\I386>expand -r USBSTOR.IN_ C:\WINDOWS\inf
Microsoft (R) File Expansion Utility Version 5.1.2600.0
Copyright (C) Microsoft Corp 1990-1999. All rights reserved.
Expanding usbstor.in_ to c:\windows\inf\usbstor.inf.
usbstor.in_: 2972 bytes expanded to 14578 bytes, 390% increase.
January 18, 2008 - 16:51, by Steven Van de Craen
Categories: .NET, SharePoint 2007
Programmatically starting a workflow requires the following code:
Guid wfBaseId = new Guid("{6BE0ED92-BB12-4F8F-9687-E12DC927E4AD}");
SPSite site = ...;
SPWeb web = site.OpenWeb();
SPList list = web.Lists["listname"];
SPListItem item = list.Items[0];
SPWorkflowAssociation associationTemplate= list.WorkflowAssociations.GetAssociationByBaseID(wfBaseId);
site.WorkflowManager.StartWorkflow(item, associationTemplate, "");
The workflow base ID can be found in the workflow.xml in the corresponding feature folder.
If you have a SharePoint Designer 2007 workflow it can be obtained by opening the workflow.xoml.wfconfig.xml file in a text editor:
If you don't have initiation data don't pass null or an empty string to the StartWorkflow method or the workflow will fail ! Instead use a single empty XML node (see sample code above).
January 17, 2008 - 11:58, by Steven Van de Craen
Categories: Office 2003, Office 2007, SharePoint 2003, SharePoint 2007
If the Online Presence Indicator is not working properly on some clients it could be that the IE plugin is corrupted.
Client has Office 2003
Try reinstalling the Office Web Components.
Client has Office 2007
Try the following:
- Close all IE windows
- Rename the file C:\Program Files\Microsoft Office\Office12\name.dll to name.dll.bak (or delete it)
- Start MSN Messenger / Live Messenger / Windows Messenger (not sure why but it did the trick)
- Open a SharePoint page in IE and Office 2007 will reconfigure itself
Helped in my case !
January 14, 2008 - 10:05, by Steven Van de Craen
Categories: .NET, Search, SharePoint 2007
When you query the SharePoint Search Service the number of rows returned defaults to 100 but can be increased as required.
Note that when you specify a value above the maximum RowLimit the query will only return the default value of 100 items !
ServerContext ctx = ServerContext.Default;
FullTextSqlQuery query = new FullTextSqlQuery(ctx);
query.QueryText = BuildQuery();
query.ResultTypes = ResultType.RelevantResults;
query.RowLimit = 1000;
ResultTable resultTable = query.Execute()[ResultType.RelevantResults];
After some trial and error I found the maximum value for the RowLimit to be 917728059.
query.RowLimit = 917728059;
So don't go around setting the RowLimit to int.MaxValue like I did because this only returns 100 items...
UPDATE:
This only applies to the the MOSS 2007 RTM version and seems to be fixed since Service Pack 1.
You can now set the RowLimit to anything from 1 to int.MaxValue and it will return the correct number of items.