check this article from PlanetWilson SharePoint Blog its good
Tuesday, July 27, 2010
SharePoint field objects – classname, name and types
While working on one of SharePoint project I searched for classnames and fieldtypes that I needed to identify all different field types.
Following table shows most important fields for list.
important fields.
| Classname | Type | TypeAsString | TypeDisplayName | TypeShortDescription |
| Microsoft.SharePoint.SPFieldBoolean | Boolean | Boolean | Yes/No | Yes/No (check box) |
| Microsoft.SharePoint.SPFieldCalculated | Calculated | Calculated | Calculated | Calculated (calculation based on other columns) |
| Microsoft.SharePoint.SPFieldChoice | Choice | Choice | Choice | Choice (menu to choose from) |
| Microsoft.SharePoint.SPFieldComputed | Computed | Computed | Computed | Computed |
| Microsoft.SharePoint.SPFIeld | ContentTypeId | ContentTypeId | Content Type Id | Content Type Id |
| Microsoft.SharePoint.SPFieldCurrency | Currency | Currency | Currency | Currency ($, , ?) |
| Microsoft.SharePoint.SPFieldDateTime | DateTime | DateTime | Date and Time | Date and Time |
| Microsoft.SharePoint.SPFieldFile | File | File | File | File |
| Microsoft.SharePoint.SPField | Guid | Guid | Guid | Guid |
| Microsoft.SharePoint.SPFieldNumber | Integer | Integer | Integer | Integer |
| Microsoft.SharePoint.Portal.WebControls.BusinessDataField | Invalid | BusinessData | Business data | Business data |
| Microsoft.SharePoint.Publishing.Fields.ContentTypeIdFieldType | Invalid | ContentTypeIdFieldType | Content Type Id | Content Type Id |
| Microsoft.SharePoint.Publishing.Fields.HtmlField | Invalid | HTML | Publishing HTML | Full HTML content with formatting and constraints for publishing |
| Microsoft.SharePoint.Publishing.Fields.ImageField | Invalid | Image | Publishing Image | Image with formatting and constraints for publishing |
| Microsoft.SharePoint.Publishing.Fields.LayoutVariationsField | Invalid | LayoutVariationsField | Variations | Page Layout Variations |
| Microsoft.SharePoint.Publishing.Fields.LinkField | Invalid | Link | Publishing Hyperlink | Hyperlink with formatting and constraints for publishing |
| Microsoft.SharePoint.Publishing.Fields.PublishingScheduleEndDateField | Invalid | PublishingScheduleEndDateFieldType | Publishing Schedule End Date | Publishing Schedule End Date |
| Microsoft.SharePoint.Publishing.Fields.PublishingScheduleStartDateField | Invalid | PublishingScheduleStartDateFieldType | Publishing Schedule Start Date | Publishing Schedule Start Date |
| Microsoft.SharePoint.Publishing.Fields.SummaryLinkField | Invalid | SummaryLinks | SummaryLinks | Summary Links data |
| Microsoft.Office.Server.WebControls.FieldTypes.SPFieldTargetTo | Invalid | TargetTo | Audience Targeting | Audience Targeting |
| Microsoft.SharePoint.SPFieldLookup | Lookup | Lookup | Lookup | Lookup (information already on this site) |
| Microsoft.SharePoint.SPFieldLookup | Lookup | LookupMulti | Lookup | Lookup (information already on this site) |
| Microsoft.SharePoint.SPFieldNumber | Number | Number | Number | Number (1, 1.0, 100) |
| Microsoft.SharePoint.SPFieldRecurrence | Recurrence | Recurrence | Recurrence | Recurrence |
| Microsoft.SharePoint.SPFieldMultiLineText | Note | Note | Multiple lines of text | Multiple lines of text |
| Microsoft.SharePoint.SPFieldText | Text | Text | Single line of text | Single line of text |
| Microsoft.SharePoint.SPFieldUrl | URL | URL | Hyperlink or Picture | Hyperlink or Picture |
| Microsoft.SharePoint.SPFieldUser |
Samples:
SPSite site = new SPSite("http://office2007");
SPWeb web = site.OpenWeb();SPList list = web.Lists["Documenten"];
// Add a new text fieldlist.Fields.Add("NewTextField", SPFieldType.Text, false);
// Add a new HTML fieldHtmlField htmlField = new HtmlField(
list.Fields, "HTML", "NewHTMLField");
list.Fields.Add(htmlField);
Wednesday, July 14, 2010
Internal mechanism of showing indicator of long operations in Sharepoint using SPLongOperation
This is regarding the progress of process that we we usually see into sharepoint like while creating new site or so.
This is very informative blog
http://sadomovalex.blogspot.com/2010/07/internal-mechanism-of-showing-indicator.html
This is very informative blog
http://sadomovalex.blogspot.com/2010/07/internal-mechanism-of-showing-indicator.html
Open SPSite under RunWithElevatedPrivileges in proper zone
This is very good point when we are developing some custom code which is gona be used for a web application that is hosted on multiple zones like Intranet and Internet and so
http://sadomovalex.blogspot.com/2010/01/open-spsite-under-runwithelevatedprivil.html
http://sadomovalex.blogspot.com/2010/01/open-spsite-under-runwithelevatedprivil.html
Tuesday, July 13, 2010
Fire a button click event when user press enter key from textbox
It is very common requirement that when user clicks enter key. a specific submit button event should fire. Sadomovalex has explained it very well in following blog.
http://sadomovalex.blogspot.com/2009/12/post-login-form-without-submit-button.html
http://sadomovalex.blogspot.com/2009/12/post-login-form-without-submit-button.html
Camlex.NET simplifies creating of CAML queries for Windows SharePoint Services by using expression trees
This is very good technique when we need to work on CAML queries.
Contributors have done a great job.
Check this for more info on Camlex.NET
http://camlex.codeplex.com/
Check following link for good examples by Sadomovalex for camlex
http://sadomovalex.blogspot.com/2010/06/build-dynamic-caml-queries-based-on.html
Contributors have done a great job.
Check this for more info on Camlex.NET
http://camlex.codeplex.com/
Check following link for good examples by Sadomovalex for camlex
http://sadomovalex.blogspot.com/2010/06/build-dynamic-caml-queries-based-on.html
Cross-site and cross-site collection navigation in Sharepoint
This is very good article about, how we can have common navigation for all sites of a site collection or even accross site collections too.
http://sadomovalex.blogspot.com/2010/05/cross-site-and-cross-site-collection.html
http://sadomovalex.blogspot.com/2010/05/cross-site-and-cross-site-collection.html
Subscribe to:
Posts (Atom)