SharePoint Developer Team Blog

Brought to you by Microsoft teams working on SharePoint developer content, Visual Studio tools, and of course the platform itself!

January, 2011

  • SharePoint Developer Team Blog

    Loading Script in SharePoint 2010 (Dallas Tester)

    • 6 Comments
    SharePoint 2010 ships with a large EcmaScript-based object model. In order to alleviate downloading all of the script at one time, there is a system built into the object model called Script on Demand. Script on Demand is a publicly available script loading mechanism. It contains methods for loading script, registering script dependencies, executing methods within a loaded file, and event notification. I'll describe the methods and show a short example for some of them. SP.SOD class All of the public OM can be accessed using the SP.SOD class . This class is defined in the init.js file on the Web front end.  You may have seen examples out there that access these methods without the class specified, but you should always use the class in order to ensure compatibility with future versions of SharePoint. On to the APIs! SP.SOD.execute(key, functionName, args) Executes the function functionName in the file identified by key with the arguments specified. This will also load the script if...
  • SharePoint Developer Team Blog

    Recent SharePoint Developer Content (Mary Lee)

    • 0 Comments
    You can visit the SharePoint Developer Center to learn about the latest SharePoint developer content that is available to read, listen, or watch. For example, the following articles, videos, and code samples were published recently. Creating Custom SharePoint Server 2010 Document Sets with Visual Studio 2010 Learn how to create SharePoint Server 2010 document sets by using Visual Studio 2010 instead of by using the browser-based user interface. Video: Creating Custom SharePoint Server 2010 Document Sets with Visual Studio 2010 Learn how to create SharePoint Server 2010 document sets with Visual Studio 2010 instead of with the browser-based user interface. Exploring PowerPivot for Excel and SharePoint: Blue Yonder Charters Explore a project that uses PowerPivot for Excel, Microsoft Silverlight, and SharePoint Server 2010 to aggregate and share information, both inside and outside a firewall. Customizing and Extending the SharePoint 2010 Server Ribbon Learn about the components that make...
  • SharePoint Developer Team Blog

    Learning Resources for SharePoint Sandboxed Solutions (Ricky Kirkham)

    • 0 Comments
      There is now a Developer Resource Center for SharePoint 2010 Sandboxed Solutions, so I’m replacing the content of this post with a link to it. Sandboxed Solutions Resource Center | SharePoint 2010
  • SharePoint Developer Team Blog

    Why do my new list fields not appear on the New, Edit, or Display forms? (Ricky Kirkham)

    • 0 Comments
    The question in the title comes up so often, I suspect that everyone who creates a new list type for the first time encounters this problem: You have created a <ListTemplate … > element in an elements.xml file. You have added <Field … > elements to the schema.xml file to represent your fields. Also in the schema.xml , for each new field, you have added <FieldRef … > elements to the <ViewFields> section of every view in on which you want your fields to appear. You deploy the list template and create a new list from it.  You can see your new fields on all the views where they are supposed to be. Everything seems to be working, but … When you click Add new item to create the first list item, you discover that your fields are not on the New form. If you create the item anyway and then try to edit it or display it, you find that your fields are not on the Edit or Display forms either. The key to understanding the problem is to remember that list views and content...
  • SharePoint Developer Team Blog

    Enabling sorting in a JS Grid control (Sivaraman Krishnan)

    • 9 Comments
    This how-to demonstrates how to enable sorting on a basic JS Grid control. This how-to builds on the How to: Create a Basic JS Grid topic in the SharePoint 2010 SDK , and assumes that you've created a basic JS Grid control as outlined in that topic. Prerequisites Microsoft SharePoint Foundation 2010 Microsoft Visual Studio 2010 Completion of How to: Create a Basic JS Grid Creating a sortable grid Creating a sortable grid involves the following steps: Enabling sort behaviour on columns Using a JS Grid delegate to handle the sort in ECMAScript (JavaScript, Jscript) Writing a callback to sort the data and rebind the grid To enable sorting with IsSortable property Open the JsGrid solution you created in the previous how-to. Open GridUtilities.cs. In GetGridColumns method, set the IsSortable property of GridColumn to true. To make specific columns sortable, use conditional statements on the...
  • SharePoint Developer Team Blog

    Using the Dialog Platform (Dallas Tester)

    • 2 Comments
    The dialog platform was introduced in SharePoint 2010 as a way to keep users in context when working with items in lists and document libraries. At its basics, the dialog platform is an HTML IFrame that is loaded on top of a page. The dialog can contain any Web page stored on the Web front end or any HTML specified in a call to the APIs. As a developer you can also leverage the dialog platform. This post will provide a quick overview of this platform. Hiding User Interface Elements in a Dialog Dialog pages are accessed both inside a dialog as well as outside of a dialog. Given that these contexts can vary, there is a built-in CSS class used to hide elements when hosted inside a dialog. The s4-notdlg CSS class specifies that an element will not appear in a dialog. This is useful for UI elements that do not work well inside of a dialog but look fine when the page is loaded outside of the dialog. To hide an element that should not be inside a dialog, you simply set the CSS class either using...
  • SharePoint Developer Team Blog

    Multi-language support for SharePoint Sites (Mary Lee)

    • 0 Comments
    SharePoint 2010 supports multiple languages per site, and you can check that the site template supports MUI by using the SPWebTemplate.SupportsMultilingualUI property. Then, you can use the SPWeb.AddSupportedUICulture method to add a new culture. For more information about localization, see the following MSDN topics. Localizing SharePoint Solutions How to: Localize a Feature Walkthrough: Localizing a Visual Studio SharePoint Application Localizing the User Interface Walkthrough: Localizing a Web Part Mary Lee, Programming Writer.
  • SharePoint Developer Team Blog

    New SharePoint Developer Features in VS2010 SP1 – Unit Testing and IntelliTrace (Saaid Khan)

    • 3 Comments
    We recently released Visual Studio 2010 SP1 Beta and SharePoint developers will be excited to know there are some great features that are now available to them. As part of VS 2010 SP1 SharePoint developers can now take advantage of IntelliTrace as well as create unit tests that use SharePoint API’s. With 64-bit support now enabled in IntelliTrace, you can use IntelliTrace in your SharePoint farm solutions. You can set a break-point in your code or break execution and then view the IntelliTrace data. You can also collect IntelliTrace data and save the .itrace log file for viewing at a later time. Check out Justin Marks great article on IntelliTrace in VS2010. For those SharePoint developers that create unit tests, you can now create and execute unit tests for your SharePoint 2010 solutions if they use SharePoint API’s. In order to execute these unit tests you first need to deploy your SharePoint solution to your local developer machine. After that, you can execute the unit tests as you would...
Page 1 of 1 (8 items)