Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Tuesday, January 26, 2010

SPGridView and "Multiple Lines of Text" type in SharePoint.

To remove the div tag from being displayed in SPGridView when displaying data from "Multiple Lines of Text" column type, set the HtmlEncode property of the BoundField to false.

BoundField boundfield = new BoundField();
boundfield.HeaderText = "Description";
boundfield.DataField = "Description";
boundfield.SortExpression = "Description";
boundfield.HtmlEncode = false;

m_GridView.Columns.Add(boundfield);

Thursday, November 05, 2009

Organization Hierarchy SharePoint web part.

Organization hierarchy web part shown on the profiles page of SharePoint My Site is defined in the person.aspx page of the SPSMSITEHOST site template (12 hive\TEMPLATE\SiteTemplates).
<SPSWC:ProfileManages FrameType="None" id="ProfileManages" runat="server" />
in person.aspx is the line which renders the organization hierarchy web part. This is defined in "Microsoft.SharePoint.Portal" assembly and the namespace is "Microsoft.SharePoint.Portal.WebControls".


Tuesday, March 04, 2008

Installing Language Packs for Office SharePoint Server 2007

Language packs enables Administrators of sites and site collections to create sites and site collections using different languages other than the install language. The language packs needs to be installed on all the web front-end servers in a farm. My suggestion would be to install the language packs on all the servers on the farm. So that if you need to convert an application server into a web front end server, you can do it with minimum effort.
Language packs are available for the following languages:
· Arabic
· Bulgarian
· Catalan
· Chinese (Simplified)
· Chinese (Traditional)
· Croatian
· Czech
· Danish
· Dutch
· English
· Estonian
· Finnish
· French
· German
· Greek
· Hebrew
· Hindi
· Hungarian
· Italian
· Japanese
· Korean
· Latvian
· Lithuanian
· Norwegian (BokmÃ¥l)
· Polish
· Portuguese (Brazil)
· Portuguese (Portugal)
· Romanian
· Russian
· Serbian (Latin)
· Slovak
· Slovenian
· Spanish
· Swedish
· Thai
· Turkish
· Ukrainian
Before you install language packs on your front-end Web servers, you must do the following:
· Install the necessary language files on your front-end Web servers.
· Install Office SharePoint Server 2007 on each of your front-end Web servers.
· Run the SharePoint Products and Technologies Configuration Wizard on each of your front-end Web servers.
Most language files are installed by default on the Microsoft Windows Server 2003 operating system. However, you must install supplemental language files for East Asian languages and languages that use complex script or require right-to-left orientations. Below are the steps to install the supplemental language support.

Installing Supplemental language support
Supplemental language support for complex script and right-to-left languages needs to be installed if you are installing the language pack for the following languages:
· Arabic
· Armenian
· Georgian
· Hebrew
· Indic
· Thai
· Vietnamese
Supplemental language support for East Asian languages needs to be installed if you are installing the language pack for the following languages:
· Chinese
· Japanese
· Korean
Following are the procedures to install supplemental language support on Windows 2003 server for
· Complex script and right-to-left languages
· East Asian languages

1. Go to Control Panel from the Start menu
2. Double click on Regional and Language Options in the control panel

3. Select the Languages tab in the Regional and Language Options window


4. Under Supplemental language support, Select the appropriate check boxes against :
· Install files for complex script and right-to-left languages
· Install files for East Asian languages

5. Click the OK button.
You will be prompted to insert the Windows 2003 install CD.
After installing the files, restart the server when prompted.


Downloading and installing the language pack
You download the language packs using the following URLs
http://www.microsoft.com/downloads/details.aspx?familyid=318D8562-58BD-4329-B1F6-F1941A38BC7F&displaylang=en (SharePoint Server 2007 x64 bit)
http://www.microsoft.com/downloads/details.aspx?familyid=2447426b-8689-4768-bff0-cbb511599a45&displaylang=en&tm (SharePoint Server 2007 x32 bit)

In the download page select the appropriate language from the drop-down and click on the change button. After the page refreshes, click on the Download button to get the language pack.
Once the download is complete use a tool like ISOBuster to extract the contents. Once extracted, click on setup.exe to install the language pack after accepting the license agreement.
After completing the language pack setup you must rerun the SharePoint Products and Technologies Configuration wizard using the default settings. If you do not run the SharePoint Products and Technologies Configuration Wizard after you install a language pack, the language pack will not be installed properly.


Once the download is complete use a tool like ISOBuster to extract the contents. Once extracted, click on setup.exe to install the language pack after accepting the license agreement.After completing the language pack setup you must rerun the SharePoint Products and Technologies Configuration wizard using the default settings. If you do not run the SharePoint Products and Technologies Configuration Wizard after you install a language pack, the language pack will not be installed properly.

Creating a Site collection using the installed language pack
1. In Central Administration click on Create Site Collection link in the Application Management tab.In the create site collection page go to Template Selection section and select a language from the drop-down.



3. Once you select the language, the template names and description in the Template selection section will be displayed in the selected language. Select the template to use for the site collection and click ok.


4. The new site collection will be rendered using the selected language.

Friday, February 29, 2008

How to Enumerate the Shared Service Providers using SharePoint Object Model.

SharePoint Object Model does not expose the SharedResourceProviders collection as a public property. It is a non-public member of the ServerFarm object.

This said, we can still access the SharedResourceProviders property using the magic of "reflection". Below is the code to enumerate the Shared service propviders.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using Microsoft.Office.Server;

namespace Velavan.EnumSSPs
{
class Program
{
static void Main(string[] args)
{
EnumSharedServiceProviders();
}

private static void EnumSharedServiceProviders()
{
//Get the default server context
ServerContext sc = ServerContext.Default;

//Use reflection to get the m_ServerFarm Property
object serverFarm = sc.GetType().GetField("m_ServerFarm", BindingFlags.Instance BindingFlags.NonPublic).GetValue(sc);

//Use reflection to get the ShareResourceProviders collection
object sharedResourceProviders = serverFarm.GetType().GetProperty("SharedResourceProviders").GetValue(serverFarm, null);

//Enumerate all Shared Service providers
foreach (object sharedResourceProvider in sharedResourceProviders as IEnumerable)
{
Console.WriteLine("SSP - " +
sharedResourceProvider.GetType().GetProperty("Name").GetValue(sharedResourceProvider, null) as string);
}
}
}
}


make sure you add the references to
Microsoft.Office.Server.dll and
Microsoft.SharePoint.dll

Friday, June 15, 2007

Changing the Configuration database server in MOSS 2007

To change the configration database server in MOSS 2007 do the following
1. Shutdown the servers in the farm
2. Copy all the configuration database to the new database server
3. Turn on the servers and execute stsadm -o renameserver -olservername -newservername
4. You should reboot the server
5. Execute these steps on all the servers in the farm