Friday, February 21, 2014

Adding Recursive Folders to TFS using C#


Add reference to two dlls

Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.VersionControl.Client.dll

Include following assemblies,

using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Framework.Client;


Authenticating TFS

// Providing URL, UserName and Password
TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri(tfsURL), new                          System.Net.NetworkCredential(userName,password));

// Checking Authentication
tpc.EnsureAuthenticated();

// Getting Version Control instance
VersionControlServer versionControl = tpc.GetService<VersionControlServer>();

Create Simple Accordion with JQuery (Not JQuery UI)

Why not use JQuery UI accordion?

JQuery UI is more professional accordion and has too many options. But in my last project, I had to create accordion having different color coding on each heading background and other rendering options so i just created very very simple accordion.

I have created two Headings and for each heading i have provided class name "question" and for each detail, class name is "answer".When the page is opened first time, you can hide all the details by,   $('.answer').hide();this line can also be written in document.ready method.

Saturday, February 15, 2014

Setting Jquery UI Auto complete on SharePoint Text Filter

Steps,

1- Add Text Filter and List Web Part on the page.
2- Add connection between text filter and List webpart.
3- Open Notepad, Add following script in the Notepad.
4- Change the controlID variable value to the generated client id of Text Filter textbox.
5- Change the List and column names in the SP Service call.
6- Save the file in Site Asset library.
7- Add Content Editor web part on the page and provide link to the text file placed in the Site asset Library.

Enjoy:)