[Sample of Apr 20th] Custom DataGrid Control for WebAccess - Microsoft All-In-One Code Framework - Site Home - MSDN Blogs
Microsoft All-In-One Code Framework - Developers' Pain Killer

[Sample of Apr 20th] Custom DataGrid Control for WebAccess

Rate This
  • Comments 1

 

Homepage image
Sample of the Day RSS Feed

Sample Downloads
C# version:
http://code.msdn.microsoft.com/CSTFSWebAccessWorkItemDataG-c4cdf62b
VB version:
http://code.msdn.microsoft.com/VBTFSWebAccessWorkItemDataG-fa3fa520

Today’s code sample demonstrates how to create a Custom Data Grid work item control of TFS2010 WebAccess.  It’s written by our star developer: Ruiz Yi.

imageYou can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

 

Introduction

The CSTFSWebAccessWorkItemDataGridControl sample demonstrates how to create a Custom Data Grid work item control of TFS2010 WebAccess.

  1. Display a Field value in DataGrid
  2. Save the data in DataGrid to a WorkItem Field
  3. Support customize the Columns' Name
  4. Avoid  Illegal characters

NOTE: The client javsscript uses Microsoft.XMLDOM to parse the xml, and it only works for IE


Building the Sample

This sample should be built on TFS2010 AppTier and the target framework is .NET Framework 3.5, because following assemblise are only available in the App Tier

  • Microsoft.TeamFoundation.WorkItemTracking.Client
  • Microsoft.TeamFoundation.WebAccess.Controls
  • Microsoft.TeamFoundation.WebAccess.WorkItemTracking

 

Running the Sample

1.  Copy following items to C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Access\Web\App_Data\CustomControls.

DataGridControl.wicc

CSTFSWebAccessWorkItemDataGridControl.dll

2.  Use WitAdmin importwitd command line to import the WIT Controls (WIT Controls.xml) WorkItem Type.

See http://msdn.microsoft.com/en-us/library/dd312129.aspx. TFS Power Tools also supplies a more convenient approach.

3. Open Team WebAccess in IE, and connect to the Team Project to which you import the WIT Controls.

4.  Create a new WIT Controls work item, and you will see


5.  Type the title and data in the DataGrid, then save the work item.

6. If you add READONLY rule to Demo. GridField, or set the control as readonly, you will see

7. In the Visual Studio, you can also get the same result if you have used the CSTFSWorkItemDataGridControl.

 

More Information

Work Item Tracking Custom Controls

IWorkItemControl Interface

Leave a Comment
  • Please add 1 and 6 and type the answer here:
  • Post
  • Thanks for the sharing of the good code sample

Page 1 of 1 (1 items)