Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Archive for March, 2012

Using InfoPath Forms

Posted by Paul on March 31, 2012

InfoPath Forms are managed inside SharePoint through the

· Central Administration > General Application Settings > InfoPath Forms Services

clip_image004

What are the Tools needed?

You need InfoPath Designer 2010 to work with the examples in this article. You can download a Trial Version of Office 2010 Professional Plus 64 bit from here.

After installation you can start InfoPath Designer 2010 from the start menu.

clip_image006

Creating a Form

Now we can start by creating a Form and Deploying to our SharePoint site. Our aim is to have a simple form to capture the following fields:

· Title

· Full Name

· Address

Double Click on the SharePoint List button from the first screen of InfoPath Designer. You will get the following screen. Enter your site name there and click the Next button.

clip_image008

In the succeeding form enter your user credentials if prompted. The next wizard screen will be prompting to enter the List Name for the Form.

Note: The form which we are creating will be used to capture item information. This information is stored as a SharePoint list.

clip_image010

Click the Next button and then click Finish.

You will see the following Designer screen.

clip_image012

The Title and Attachments are two rows by default. As you will be knowing Title is the default field required and you change the caption.

Field Pane

There is a Fields pane on the right hand side from which you can drag and drop fields. You can even add new fields using the Add Field button.

clip_image014

Using the Form Designer

We can add or delete rows from the form. For example we can remove the Attachments field. Right click on the Attachments Row and use the menu item Delete > Rows

clip_image016

Now the Attachments row got deleted.

clip_image018

Now we need to add the Full Name field. For this right click on the Title row and use the menu option Insert > Rows Below.

Creating a New Field

As you can see that the Fields pane does not have a Full Name field. We need to add this now. Click on the Add field link from the Fields pane.

Enter the text Full Name in the Display Name area. The name area will be automatically filled as shown below. Leave the Data type as Single line of text itself.

clip_image020

Press the OK button and the new field is created.

clip_image022

Placing the New Field on the Form

We can just drag and drop the field and the label and text box are automatically created. But this is little tricky. In the designer drag the field to the form. If you see that the row is highlighted drop the field.

clip_image024

Now the user controls (label and textbox) are created as shown below.

clip_image026

Please repeat the same step for creating an Address field. This time you have to select a multiline textbox.

Once all the 3 fields are ready with input controls, the form would look like below:

clip_image028

Note: There is no OK and Cancel buttons as they will be shown by the runtime viewer.

Saving the Form

Now click on the Save button and enter the name as My InfoPath Form.

Publishing the Form

Now we are ready to publish the form to our SharePoint server. You can use the File > Publish > SharePoint List button to achieve this.

clip_image030

If the Publish was successful you will get the following dialog.

clip_image032

Click on the link in dialog to open the site.

clip_image034

Viewing the InfoPath Form

To view the InfoPath form we just created use the Add new item link. You can see the following screen.

clip_image036

Enter some details and click the Save button. If it goes well you can see the new item inserted.

clip_image038

So this concludes our usage of InfoPath form and Publishing it.

References

MSDN on InfoPath

More on InfoPath

Office Professional Plus

Comparison of InfoPath Features

Summary

In this article we have explored the usage of InfoPath Forms along with SharePoint 2010. In real world scenarios users can create their own InfoPath forms and publish to the SharePoint site. In the next article we can see about using Rules with InfoPath Forms.

Advertisements

Posted in SharePoint, SharePoint 2010 | Tagged: , , | Leave a Comment »

100 Answers reached in MSDN Forums :)

Posted by Paul on March 30, 2012

image

Friends.. I am very much happy to share a news that: Today I reached 100 Answers in MSDN Forums.  That was a tremendous effort for last 2 months which started 1 year back.  I have been supporting:

  • Visual C#
  • Visual C# Language
  • Windows Forms
  • .Net Base Class Library
  • Visual C# IDE

It is really good to see a milestone of 100 reached.  It was an interesting Journey.

After all fixing problems over Forums, will make us more sharp, increase our knowledge and help others who need support immediately.  Together, I found great community members whose spirit and aptitude inspired me.  It is really great to be with those talented people.

I would like to recommend you all to try the same.  Initially it will be difficult, but surely you will learn the ropes.  After all I find it really good to give back to the community which helped us in our need times.  Help, Support, Improvize, Adapt, Overcome… 🙂

You can find the updated points/status here: My Profile

Posted in C# | Tagged: , , | Leave a Comment »

TFS 2010 – How to set Check-in Policy

Posted by Paul on March 23, 2012

This article demonstrate how to enable Source Code Check-in Policy inside TFS 2010.

image

Following are the default policies available with TFS:

Policy Description
Builds This policy requires that the last build was successful for each affected continuous integration build definition.
Code Analysis This policy requires that Code Analysis is run before check-in.
Testing Policy Ensures that tests from specific test lists are successfully run before checking in.
Work Items This policy requires that one or more work items be associated with every check-in.

 

image

Step 1) Install New Policy

We can try adding a new policy that ensures Comments are associated with public methods/properties.

This is a third party plugin and you can download it from CodePlex using the following link:

http://tfsccpolicy.codeplex.com

Use the Download link to download and install the policy executable.  You need to restart Visual Studio after the installation.

image

Step 2) Open Team Explorer inside Visual Studio

image

Step 3) Open Source Control Dialog

image

Step 4) Click add button from the Check-in Policy tab

image

Step 5: Select Check for Comments item

image

Click Ok button

image

Please note that the above dialog says we have selected only Public Methods for comment requirement.

Step 6: Test the Check-in

Now we can try creating a file with comment missing for a public method.

image

Try checking in the file:

image

On checking in the above file we will get the following error dialog.

image

This makes sure that the Policy was Installed Successfully.

Summary

In this article we have explore the source code policy feature of Team Foundation Server and installing a custom Check-in policy.

Posted in C# | Tagged: , | Leave a Comment »

TFS 2010 Installation

Posted by Paul on March 23, 2012

Team Foundation Server is more than of a Source Control:

TFS provides the following features:

  1. Source Control
  2. Build Management
  3. Project Tracking

Download Trial

http://go.microsoft.com/fwlink/?LinkID=186901

Installation is possible on:

  • Windows 7
  • Windows Vista
  • Windows 2003
  • Windows 2008

Visual Studio Power Tools for TFS

http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f

Posted in C# | Tagged: , | Leave a Comment »

Windows Authentication Missing / Blank Page on installing SharePoint 2010 on Windows 7 Home Premium?

Posted by Paul on March 23, 2012

SharePoint 2010 requires at least the Professional edition of Windows 7.

If you encountered the following issues with Windows 7 Home Premium:

  • Blank Page on visiting SharePoint site or Central Administration Site
  • Windows Authentication missing in IIS

Solutions

Following are the solutions available. You can choose one of it.

1) Installing Windows Authentication Manually

Please see reply by AntonioCosta

http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/eac34068-7c14-4f6a-9272-97ebff0329e7/

 

2) Disabling Windows Authentication and using Basic Authentication (not the best way)

http://msdn.microsoft.com/en-us/library/ee554869%28office.14%29.aspx


3) More Links

http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/fe85d129-c3e6-410e-8dfb-89602734e5c9

http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/6f6f1872-1941-4ed3-a83e-609cbb7464c4/

Posted in C# | Tagged: , , | Leave a Comment »

SQL Server–Create User / Domain User using SQL

Posted by Paul on March 23, 2012

CREATE LOGIN user1WITH PASSWORD = ’MyPassword’  USE TheDbName CREATE USER user1FOR LOGIN user1;
GO
CREATE LOGIN [Domainuser1] FROM WINDOWS;
            USE TheDbName CREATE USER user1 FOR LOGIN [Domainuser1]

Posted in C# | Tagged: , | Leave a Comment »

SQL Server–Create User / Domain User using SQL

Posted by Paul on March 23, 2012

CREATE LOGIN user1WITH PASSWORD = ’MyPassword’  USE TheDbName CREATE USER user1FOR LOGIN user1;
GO
CREATE LOGIN [Domain\user1] FROM WINDOWS;
            USE TheDbName CREATE USER user1 FOR LOGIN [Domain\user1]

Posted in C# | Tagged: , | Leave a Comment »

Customizing List Form with InfoPath

Posted by Paul on March 19, 2012

In this article I will take you through a real-world scenario of customizing List Form with InfoPath.

Scenario

By default SharePoint List form provides the Attach File option, but your client wanted the option underneath the form, instead on the ribbon.

clip_image002

How to achieve this?

clip_image004

There is a way of including the attach control in list forms, but time being I am not using it.

Steps

Please follow the steps below to achieve this. Time being we can play with the Announcements list.

Step 1: Create Announcements List

clip_image006

Step 2: Open InfoPath Designer

clip_image008

Choose SharePoint List & click the Design Form button on the right.

In the appearing page enter the Site URL as shown below.

clip_image010

Step 3: Save & Publish

Step 4: Test the form

How to remove the form?

In cases you might need to rollback to the old SharePoint list form, you can use the List Settings > Form Settings to achieve the same.

clip_image012

References

http://msdn.microsoft.com/en-us/library/gg180738(v=office.14).aspx

Summary

In this article we have explored how to customize a List form with InfoPath. You need to have Microsoft Office InfoPath Designer installed in your machine.

Additionally, the client machine does not need InfoPath Designer to fill the form. SharePoint & Browser takes care of the rendering part.

Posted in SharePoint, SharePoint 2010 | Tagged: , , , , | Leave a Comment »

eBook on SharePoint 2010

Posted by Paul on March 12, 2012

I am very much happy to compile my third eBook: SharePoint 2010 Administration & Development. This book provides developers a good start with SharePoint 2010 Development.  Additionally, chapters on SharePoint Installation, Basics of Administration are included.

image

Download eBook
You can download the eBook here

Download Source
You can download the source code of examples in the book here

Pages: 253
Size: 10 MB

Full Edition Launched!

You can find the Full Edition of the book in hard cover from Amazon.

Purchase

New Additions:  625+ Pages (triple content), Real Life Scenarios for Thinking in the SharePoint Way, Interview Questions

Posted in C#, SharePoint | Tagged: | 14 Comments »

DataGridView set boolean cell to true in Runtime. How?

Posted by Paul on March 10, 2012

(dataGridView1.Rows[0].Cells[0] as DataGridViewCheckBoxCell).Value = true;
var dzone_url = ‘https://jeanpaulva.wordpress.com/2012/03/10/datagridview-set-boolean-cell-to-true-in-runtime-how/’;var dzone_title = ‘DataGridView set boolean cell to true in Runtime. How?’;var dzone_blurb = ‘DataGridView set boolean cell to true in Runtime. How?’;var dzone_style = ‘2’;

Posted in C#, WinForms | Tagged: | Leave a Comment »