<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Brij Mohan</title><link>http://weblogs.asp.net/brijmohan/default.aspx</link><description>A Microsoft .NET Developers Blog</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Silverlight 3 DataGrid Columns Grouping using PagedCollectionView</title><link>http://weblogs.asp.net/brijmohan/archive/2009/08/01/silverlight-3-datagrid-columns-grouping-using-pagedcollectionview.aspx</link><pubDate>Sat, 01 Aug 2009 11:43:34 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7159311</guid><dc:creator>mohanbrij</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=7159311</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2009/08/01/silverlight-3-datagrid-columns-grouping-using-pagedcollectionview.aspx#comments</comments><description>&lt;p&gt;In this post I am showing how to implement Column Grouping in SIlverlight 3 DataGrid, &lt;/p&gt;  &lt;p&gt;Before starting make sure you have SIlverlight3_Tools installed in your system, not SIlverlight 3 Beta, as there are lost of changes in Grouping of Columns from SIlverlight 3 Beta to Silverlight 3 RTW.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/image_3D65C3CD.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/image_thumb_48AED80A.png" width="420" height="398" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can follow the few simple steps below to get the Grouping for your Silverlight 3 DataGrid.&lt;/p&gt;  &lt;p&gt;Else you can also download the code demonstrated from &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/Silverlight3DataGrid.zip" target="_blank"&gt;here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;1. Create an Silverlight Application using you Visual Studio 2008 IDE, and add a hosting web application in the project.&lt;/p&gt;  &lt;p&gt;2. Once you have done with this, you will get an two projects in your Solution, you need to code only in your silverlight project.&lt;/p&gt;  &lt;p&gt;3. Now add a C# class file called Person.cs in your Silverlight Project. This class is used to provide some sample data to Silverlight DataGrid, you can change this to your other datasources like SQL, XML, etc.&lt;/p&gt;  &lt;p&gt;I have added the following lines of code in Person.cs&lt;/p&gt;  &lt;p&gt;&lt;style type="text/css"&gt;




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; FirstName { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; LastName { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; City { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Country { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; Age { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; List&amp;lt;Person&amp;gt; GetPersons()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;             List&amp;lt;Person&amp;gt; persons = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;Person&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;                     Age=32, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;                     City=&lt;span style="color: #006080"&gt;&amp;quot;Bangalore&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;                     Country=&lt;span style="color: #006080"&gt;&amp;quot;India&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Brij&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;Mohan&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;                 },&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;                     Age=32, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;                     City=&lt;span style="color: #006080"&gt;&amp;quot;Bangalore&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;                     Country=&lt;span style="color: #006080"&gt;&amp;quot;India&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Arun&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;Dayal&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;                 },&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;                     Age=38, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;                     City=&lt;span style="color: #006080"&gt;&amp;quot;Bangalore&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;                     Country=&lt;span style="color: #006080"&gt;&amp;quot;India&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Dave&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;Marchant&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;                 },&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt;  38:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt;  39:&lt;/span&gt;                     Age=38,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt;  40:&lt;/span&gt;                     City=&lt;span style="color: #006080"&gt;&amp;quot;Northampton&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt;  41:&lt;/span&gt;                     Country=&lt;span style="color: #006080"&gt;&amp;quot;United Kingdom&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt;  42:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Henryk&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum43"&gt;  43:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;S&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum44"&gt;  44:&lt;/span&gt;                 },&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum45"&gt;  45:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum46"&gt;  46:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum47"&gt;  47:&lt;/span&gt;                     Age=40, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum48"&gt;  48:&lt;/span&gt;                     City=&lt;span style="color: #006080"&gt;&amp;quot;Northampton&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum49"&gt;  49:&lt;/span&gt;                     Country=&lt;span style="color: #006080"&gt;&amp;quot;United Kingdom&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum50"&gt;  50:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Alton&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum51"&gt;  51:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum52"&gt;  52:&lt;/span&gt;                 },&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum53"&gt;  53:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum54"&gt;  54:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum55"&gt;  55:&lt;/span&gt;                     Age=28, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum56"&gt;  56:&lt;/span&gt;                     City=&lt;span style="color: #006080"&gt;&amp;quot;Birmingham&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum57"&gt;  57:&lt;/span&gt;                     Country=&lt;span style="color: #006080"&gt;&amp;quot;United Kingdom&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum58"&gt;  58:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Anup&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum59"&gt;  59:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;J&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum60"&gt;  60:&lt;/span&gt;                 },&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum61"&gt;  61:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum62"&gt;  62:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum63"&gt;  63:&lt;/span&gt;                     Age=27,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum64"&gt;  64:&lt;/span&gt;                     City=&lt;span style="color: #006080"&gt;&amp;quot;Jamshedpur&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum65"&gt;  65:&lt;/span&gt;                     Country=&lt;span style="color: #006080"&gt;&amp;quot;India&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum66"&gt;  66:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Sunita&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum67"&gt;  67:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;Mohan&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum68"&gt;  68:&lt;/span&gt;                 },&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum69"&gt;  69:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum70"&gt;  70:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum71"&gt;  71:&lt;/span&gt;                     Age=2, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum72"&gt;  72:&lt;/span&gt;                     City=&lt;span style="color: #006080"&gt;&amp;quot;Bangalore&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum73"&gt;  73:&lt;/span&gt;                     Country=&lt;span style="color: #006080"&gt;&amp;quot;India&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum74"&gt;  74:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Shristi&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum75"&gt;  75:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;Dayal&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum76"&gt;  76:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum77"&gt;  77:&lt;/span&gt;             };&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum78"&gt;  78:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum79"&gt;  79:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; persons;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum80"&gt;  80:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum81"&gt;  81:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;4. Now since my data is ready, I will add the DataGrid control in my XAML page, to make the presentation more attractive, I have added few more lines of code.&lt;/p&gt;

&lt;p&gt;5. I have also added a ComboBox Control to Select the Grouping Columns name.&lt;/p&gt;

&lt;p&gt;My XAML code will look something like this below.&lt;/p&gt;

&lt;p&gt;&lt;style type="text/css"&gt;




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:data&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data&amp;quot;&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Silverlight3DataGrid.MainPage&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:d&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;              &lt;span style="color: #ff0000"&gt;xmlns:mc&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;mc:Ignorable&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;d&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;d:DesignWidth&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;640&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;d:DesignHeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;480&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.154*&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.483*&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.362*&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Orientation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Horizontal&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Select Sort Criteria&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;                        &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Center&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;    &amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;             &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;                       &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;                       &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;200&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;                       &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;30&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;SortCombo&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;                       &lt;span style="color: #ff0000"&gt;SelectionChanged&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;SortCombo_SelectionChanged&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;                 &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Country&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;City&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Age&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;         &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGrid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;PersonGrid&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGrid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;6. Now as my Data and Presentation is ready, its time for me to write some lines of code to Retrieve my sample data, group them into columns and then Bind it to the Grid.&lt;/p&gt;

&lt;p&gt;Please find below the rest of the Code which demonstrates how I have Grouped the Columns using PagedCollectionView and PropertyGroupDescription.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; MainPage : UserControl&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;         PagedCollectionView collection;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; MainPage()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;             InitializeComponent();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;             BindGrid();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; BindGrid()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;             Person person = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;             PersonGrid.ItemsSource = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;             List&amp;lt;Person&amp;gt; persons = person.GetPersons();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;             collection = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PagedCollectionView(persons);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;             collection.GroupDescriptions.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;                 PropertyGroupDescription(&lt;span style="color: #006080"&gt;&amp;quot;Country&amp;quot;&lt;/span&gt;));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;             PersonGrid.ItemsSource = collection;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; SortCombo_SelectionChanged(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;             SelectionChangedEventArgs e)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;             ComboBoxItem person = SortCombo.SelectedItem &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; ComboBoxItem;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;             collection.GroupDescriptions.Clear();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;             collection.GroupDescriptions.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;                 PropertyGroupDescription(person.Content.ToString()));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;             PersonGrid.ItemsSource = &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;             PersonGrid.ItemsSource = collection;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;style type="text/css"&gt;




.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;Yes its that simple, and its done. I know I have not given much description here, because nothing much to explain here. In the code above I am loading the Grid with my sample data coming from my Person class and default grouping the Person with Country.&lt;/p&gt;

&lt;p&gt;Later on SortCombo_SelectionChanged, I am dynamically fetching the Selected column names from the ComboBox and Sorting on that.&lt;/p&gt;

&lt;p&gt;Once you will run this application the screen will look something like this as given below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Grouped by Country&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/image_58023A19.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/image_thumb_03665B14.png" width="416" height="394" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Grouped by City&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/image_2ECA7C0E.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/image_thumb_453D1A95.png" width="422" height="452" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;strong&gt;&lt;u&gt;Grouped by Age&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/image_5BAFB91C.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/image_thumb_7CFF38EB.png" width="466" height="505" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;You can group according to your requirement, like Grouping Active and Deleted items, etc.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;You can also download the sample code from &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/Silverlight3DataGrid.zip" target="_blank"&gt;here.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Cheers&lt;/p&gt;

&lt;p&gt;~Brij&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7159311" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+3.5/default.aspx">Framework 3.5</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+3.0/default.aspx">Silverlight 3.0</category></item><item><title>FREE Cheat Sheets for Developers(Quick Reference Card)</title><link>http://weblogs.asp.net/brijmohan/archive/2009/07/26/free-cheat-sheets-for-developers-quick-reference-card.aspx</link><pubDate>Sun, 26 Jul 2009 15:47:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7154815</guid><dc:creator>mohanbrij</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=7154815</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2009/07/26/free-cheat-sheets-for-developers-quick-reference-card.aspx#comments</comments><description>&lt;P&gt;Hi All, here is the link for the great library of cheat sheets, I assure you that after looking into this collection you will be amazed....these Cheat Sheets are...&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Written by bestselling authors and leading experts 
&lt;LI&gt;Reliable information on major developer topics 
&lt;LI&gt;Filled with useful tips and source code examples 
&lt;LI&gt;PDF looks great on-screen or printed from your printer &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;To name a few...&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;Design Patterns&lt;/FONT&gt;&lt;/STRONG&gt; 
&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;Silverlight 2&lt;/FONT&gt;&lt;/STRONG&gt;, I am eagerly waiting for Silverlight 3, I know its too early... 
&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;C#&lt;/FONT&gt;&lt;/STRONG&gt; 
&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;Core .NET&lt;/FONT&gt;&lt;/STRONG&gt; 
&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;Core ASP.NET&lt;/FONT&gt;&lt;/STRONG&gt; 
&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;Scrum&lt;/FONT&gt;&lt;/STRONG&gt; 
&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;Windows PowerShell&lt;/FONT&gt;&lt;/STRONG&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;These are just few of my interest, but you can always register and logon to download lot more of your interest too...from the link below.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://refcardz.dzone.com/" mce_href="http://refcardz.dzone.com/"&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;http://refcardz.dzone.com/&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7154815" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Cheat+Sheets/default.aspx">Cheat Sheets</category></item><item><title>Sharing source code between .NET and Silverlight</title><link>http://weblogs.asp.net/brijmohan/archive/2009/07/23/sharing-source-code-between-net-and-silverlight.aspx</link><pubDate>Thu, 23 Jul 2009 08:14:53 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7153259</guid><dc:creator>mohanbrij</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=7153259</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2009/07/23/sharing-source-code-between-net-and-silverlight.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;A common problem when developing Silverlight applications is how to share classes and in particular (Entity Framework) entities which are compiled for the full .NET framework in a Silverlight application. Silverlight is a browser plugin and a platform independent subset of the full .NET framework. Therefore Visual Studio does not allow referencing .NET assemblies from your Silverlight application.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Fortunately there is a very simple technique to share and reuse source code. Full details of which you can find in the link below&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.scip.be/index.php?Page=ArticlesNET28&amp;amp;Lang=EN"&gt;http://www.scip.be/index.php?Page=ArticlesNET28&amp;amp;Lang=EN&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;In this article &lt;a href="http://www.scip.be/index.php?Page=Webmaster&amp;amp;Lang=EN"&gt;Stefan Cruysberghs&lt;/a&gt; demonstrated this technique with several real world examples and I will give you some handy tips.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.scip.be/#ReferenceAssembly"&gt;Referencing assemblies&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.scip.be/#LinkFile"&gt;Linking files in Silverlight assemblies&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.scip.be/#CompilerDirective"&gt;Using the SILVERLIGHT compiler directive&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.scip.be/#WpfSilverlight"&gt;Sharing code between WPF and Silverlight&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.scip.be/#PocoEntities"&gt;Sharing (POCO) entities between your .NET domain layer and Silverlight&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.scip.be/#ExtensionMethods"&gt;Sharing extension methods between .NET and Silverlight&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.scip.be/#EntityFramework"&gt;Sharing logic in your Entity Framework entities between your .NET domain layer and Silverlight&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.scip.be/#PartialMethods"&gt;Sharing common logic and separating framework dependent implementations&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This linked has helped me, as I have SOA, where WCF Services, DataContracts, ServiceContracts are shared between my ASP.NET , WPF and Silverlight application. &lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7153259" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+3.5/default.aspx">Framework 3.5</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+3.0/default.aspx">Silverlight 3.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Migration from Silverlight 2.0 to Silverlight 3</title><link>http://weblogs.asp.net/brijmohan/archive/2009/07/20/migration-from-silverlight-2-0-to-silverlight-3.aspx</link><pubDate>Mon, 20 Jul 2009 11:20:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7151312</guid><dc:creator>mohanbrij</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=7151312</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2009/07/20/migration-from-silverlight-2-0-to-silverlight-3.aspx#comments</comments><description>&lt;P&gt;As currently I am working on Migration from Silverlight 2.0 to Silverlight 3, so I thought to share or bookmark few of the important links which I am going through.&lt;/P&gt;
&lt;P&gt;Find below the links&lt;/P&gt;
&lt;P&gt;&lt;A title=http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx href="http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx"&gt;http://msdn.microsoft.com/en-us/library/cc645049(VS.95).aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://timheuer.com/blog/archive/2009/07/10/silverlight-3-released-what-is-new-and-changed.aspx" mce_href="http://timheuer.com/blog/archive/2009/07/10/silverlight-3-released-what-is-new-and-changed.aspx"&gt;Silverlight 3 Released! What is new/changed?&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The following list encompasses all changes made between the Silverlight Toolkit March 2009 release and the Silverlight Toolkit July 2009 release. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20July%202009%20change%20list" mce_href="http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20July%202009%20change%20list"&gt;Silverlight Toolkit July 2009 Changes&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The following list encompasses all change made between the Silverlight Toolkit December 2008 release and the Silverlight Toolkit March 2009 release.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20March%202009%20change%20list&amp;amp;referringTitle=Home" mce_href="http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20March%202009%20change%20list&amp;amp;referringTitle=Home"&gt;Silverlight Toolkit March 2009 change list&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;In the process of upgrade there are few more challenges I am going to face&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Upgrade of my WCF Services to implement Silverlight 3 Validation controls, as my DataContract is residing in Service Layer, and I am using WSSF to generate the WCF DataContract, ServiceContract, etc. As all the DataCOntracts are AutoGenerated so implementing the Validation in Silverlight will be bit tricky.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since I am still in the process of upgrade, so if you too have some good links which will help me to upgrade my Services as I mentioned above then please&amp;nbsp;do share here.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Brij Mohan&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7151312" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+3.5/default.aspx">Framework 3.5</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+3.0/default.aspx">Silverlight 3.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+2.0/default.aspx">Silverlight 2.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/WSSF/default.aspx">WSSF</category></item><item><title>Silverlight Presentation on 17th July 2009</title><link>http://weblogs.asp.net/brijmohan/archive/2009/07/20/silverlight-presentation-on-17th-july-2009.aspx</link><pubDate>Mon, 20 Jul 2009 07:03:06 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7151154</guid><dc:creator>mohanbrij</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=7151154</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2009/07/20/silverlight-presentation-on-17th-july-2009.aspx#comments</comments><description>&lt;p&gt;&lt;a title="1 Layouts Presentation.zip" href="http://weblogs.asp.net/blogs/brijmohan/DemoPresentation/1%20Layouts%20Presentation.zip"&gt;1 Layouts Presentation.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2 Introducing_Silverlight_2.zip" href="http://weblogs.asp.net/blogs/brijmohan/DemoPresentation/2%20Introducing_Silverlight_2.zip"&gt;2 Introducing_Silverlight_2.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="3 Introductionto Silverlight 3.zip" href="http://weblogs.asp.net/blogs/brijmohan/DemoPresentation/3%20Introductionto%20Silverlight%203.zip"&gt;3 Introductionto Silverlight 3.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="4 Silverlight Control Lifecycle.zip" href="http://weblogs.asp.net/blogs/brijmohan/DemoPresentation/4%20Silverlight%20Control%20Lifecycle.zip"&gt;4 Silverlight Control Lifecycle.zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;These are the Slides of the Silverlight Presentation which I had given on 17th July 2009, other useful links where you can download the examples and Installers are given below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.net/getstarted/silverlight3/default.aspx" target="_blank"&gt;WHAT’S NEW IN SILVERLIGHT 3?&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=9442B0F2-7465-417A-88F3-5E7B5409E9DD&amp;amp;displaylang=en" target="_blank"&gt;Download Microsoft® Silverlight™ 3 Tools for Visual Studio 2008 SP1&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This download will install the following: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Silverlight 3 developer runtime &lt;/li&gt;    &lt;li&gt;Silverlight 3 software development kit &lt;/li&gt;    &lt;li&gt;KB967143 for Visual Studio 2008 SP1     &lt;br /&gt;and/or      &lt;br /&gt;KB967144 for Visual Web Developer 2008 Express with SP1 &lt;/li&gt;    &lt;li&gt;Silverlight 3 Tools for Visual Studio 2008 SP1     &lt;br /&gt;and/or      &lt;br /&gt;Silverlight 3 Tools for Visual Web Developer 2008 Express with SP1&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/silverlight/"&gt;The Official Site of &lt;em&gt;Silverlight&lt;/em&gt; | Microsoft &lt;em&gt;Silverlight&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/info.aspx?na=40&amp;amp;p=1&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=9442b0f2-7465-417a-88f3-5e7b5409e9dd&amp;amp;u=http%3a%2f%2fwww.microsoft.com%2fexpression%2ftry-it%2fblendpreview.aspx"&gt;Microsoft Expression Blend 3&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/info.aspx?na=40&amp;amp;p=2&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=9442b0f2-7465-417a-88f3-5e7b5409e9dd&amp;amp;u=http%3a%2f%2fwww.silverlight.net"&gt;Silverlight Community&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/info.aspx?na=47&amp;amp;p=5&amp;amp;SrcDisplayLang=en&amp;amp;SrcCategoryId=&amp;amp;SrcFamilyId=9442b0f2-7465-417a-88f3-5e7b5409e9dd&amp;amp;u=details.aspx%3ffamilyid%3d0A9773A7-C854-41FA-B73D-535ABFB73BAF%26displaylang%3den"&gt;Microsoft Silverlight 3 Offline Documentation&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And for all other things, &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.silverlight.net"&gt;http://www.silverlight.net&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And for those who are mostly involved in Silverlight Designing &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.kirupa.com/blend_silverlight/index.htm"&gt;http://www.kirupa.com/blend_silverlight/index.htm&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://expression.microsoft.com/en-us/cc184874.aspx"&gt;http://expression.microsoft.com/en-us/cc184874.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are few basic concepts which I have used in my Presentation like Automatic Properties, Object Initializers, LINQ, etc you can find almost all these in &lt;a href="http://weblogs.asp.net/scottgu/default.aspx" target="_blank"&gt;Scott’s Blog&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thanks&lt;/p&gt;  &lt;p&gt;~Brij&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7151154" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+3.0/default.aspx">Silverlight 3.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+2.0/default.aspx">Silverlight 2.0</category></item><item><title>Silverlight 2.0 DataGrid Demo Application with Formatting of Data</title><link>http://weblogs.asp.net/brijmohan/archive/2009/04/28/silverlight-2-0-datagrid-demo-application-with-formatting-of-data.aspx</link><pubDate>Tue, 28 Apr 2009 10:33:14 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7063315</guid><dc:creator>mohanbrij</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=7063315</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2009/04/28/silverlight-2-0-datagrid-demo-application-with-formatting-of-data.aspx#comments</comments><description>&lt;p&gt;In this post I am going to show you the basic example of Creating the Page with DataBound Silverlight 2.0 DataGrid, and also I will show you how to format the Data Using IValueConverter in DataGrid dynamically.&lt;/p&gt;  &lt;p&gt;Create a new project and Select Silverlight Application. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/image_42A0C516.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/image_thumb_16541865.png" width="644" height="458" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Name your application and select Ok, select the options as given in the screen below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/image_380FCB29.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/image_thumb_0D73EA4C.png" width="544" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Once you select Ok, your solution should look something similar to the one given in the screen below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/clip_image0029_41350270.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002[9]" border="0" alt="clip_image002[9]" src="http://weblogs.asp.net/blogs/brijmohan/clip_image0029_thumb_3E3F9DBD.jpg" width="226" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Select the DataGrid from the ToolBox and Drag and Drop it on you page, you can also go and Add the DataGrid manually in you XAML code, but if you are doing so then you may also have to add the reference to the assembly and define the custom tag to use for your DataGrid. This is done automatically when you do the Drag and Drop of the control.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/clip_image00211_6A0FF1AC.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002[11]" border="0" alt="clip_image002[11]" src="http://weblogs.asp.net/blogs/brijmohan/clip_image00211_thumb_72B04A38.jpg" width="223" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now if you are aware of the Silverlight Layouts then you can format your page and position your DataGrid in more better way as given in the Code below, in the code below I am defining the Rows and Adding the Header for the Page and in the next row I am placing my DataGrid.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Page.xaml&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:data&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;DataGridDemo.Page&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:conv&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:DataGridDemo&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;600&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;White&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Center&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;50&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;List of Player and their details&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;20&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGrid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GridPlayer&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;             &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGrid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now my next task is to create the sample Data to bind the DataGrid, if you already have some data source then you can your that only, or you can use the one as given in the code below. I am creating the Player.cs and PlayerCollection.cs class, which will have to List of Players. Then in GetDemoData in Player.cs I am populating the demo data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Player.cs&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Net;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Controls;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Documents;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Ink;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Input;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media.Animation;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; DataGridDemo&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Player&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; FirstName { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; LastName { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; SkillSet { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; DateTime DOB { get; set; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; PlayerCollection GetDemoPlayers()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;             PlayerCollection players = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PlayerCollection &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Player &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;                 { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;                     FirstName = &lt;span style="color: #006080"&gt;&amp;quot;Brij&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;                     LastName = &lt;span style="color: #006080"&gt;&amp;quot;Mohan&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;                     SkillSet = &lt;span style="color: #006080"&gt;&amp;quot;Rugby&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;                     DOB=Convert.ToDateTime(&lt;span style="color: #006080"&gt;&amp;quot;08/31/1977&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;                 }, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Player&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;David&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;Osborne&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;                     SkillSet=&lt;span style="color: #006080"&gt;&amp;quot;Cricket&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt;                     DOB=Convert.ToDateTime(&lt;span style="color: #006080"&gt;&amp;quot;01/11/1976&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt;  38:&lt;/span&gt;                 },&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt;  39:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Player&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt;  40:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt;  41:&lt;/span&gt;                     FirstName=&lt;span style="color: #006080"&gt;&amp;quot;Henry&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt;  42:&lt;/span&gt;                     LastName=&lt;span style="color: #006080"&gt;&amp;quot;Smith&amp;quot;&lt;/span&gt;, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum43"&gt;  43:&lt;/span&gt;                     SkillSet=&lt;span style="color: #006080"&gt;&amp;quot;Chess&amp;quot;&lt;/span&gt;,&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum44"&gt;  44:&lt;/span&gt;                     DOB=Convert.ToDateTime(&lt;span style="color: #006080"&gt;&amp;quot;11/10/1981&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum45"&gt;  45:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum46"&gt;  46:&lt;/span&gt;             };&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum47"&gt;  47:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum48"&gt;  48:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; players;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum49"&gt;  49:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum50"&gt;  50:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum51"&gt;  51:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum52"&gt;  52:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;PlayerCollection.cs&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Net;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Controls;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Documents;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Ink;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Input;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media.Animation;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; DataGridDemo&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; PlayerCollection: List&amp;lt;Player&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now I have all the data ready to bind the Silverlight DataGrid, so I will modify my Page.xaml.cs as the one given below. In the code below I am just binding the Silverlight DataGrid using the ItemSource property of the DataGrid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Page.xaml.cs&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Net;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Controls;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Documents;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Input;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media.Animation;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; DataGridDemo&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Page : UserControl&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; Page()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;             InitializeComponent();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;             BindDataGrid();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; BindDataGrid()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;         { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;             GridPlayer.ItemsSource = Player.GetDemoPlayers();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Now you can run the application and can see the output.&lt;/p&gt;
&lt;a href="http://weblogs.asp.net/blogs/brijmohan/image_03EB0609.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/image_thumb_3E36561D.png" width="620" height="484" /&gt;&lt;/a&gt; 

&lt;p&gt;Now one thing you can notice in the screen below, i.e the DOB column, the dates are not coming what we are expecting and also the column name is also not very Readable, so we need to define the ColumnTemplates and add few more codes to customize our data and have more control on the Desing.&lt;/p&gt;
&lt;a href="http://weblogs.asp.net/blogs/brijmohan/image_44B9AFE0.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/image_thumb_1F8C3FA7.png" width="620" height="484" /&gt;&lt;/a&gt; 

&lt;p&gt;To format the DOB column, first I have Created the class, I named it here in my project as DateConverter.cs, and also added the reference to System.Windows.Data&lt;/p&gt;

&lt;p&gt;Now all we need to derive the Class from IValueConverter Interface and implement the interface, like the one given below &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;DateConverter.cs&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Net;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Controls;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Documents;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Ink;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Input;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media.Animation;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Data;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Globalization;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; DataGridDemo&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; DateConverter : IValueConverter&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;         &lt;span style="color: #cc6633"&gt;#region&lt;/span&gt; IValueConverter Members&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// Converts values on their way to the UI for display&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;The value to be formatted&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;targetType&amp;quot;&amp;gt;The target type of the conversion&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;parameter&amp;quot;&amp;gt;A format string to be used in the &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// formatting of the value&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;culture&amp;quot;&amp;gt;The culture to use for formatting&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;The converted or formatted object&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; Convert(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;, Type targetType, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; parameter, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;             System.Globalization.CultureInfo culture)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (parameter != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; formatterString = parameter.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.IsNullOrEmpty(formatterString))&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt;  38:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.Format(culture, formatterString, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt;  39:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt;  40:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt;  41:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;.ToString();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt;  42:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum43"&gt;  43:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum44"&gt;  44:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum45"&gt;  45:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// Converts values on their way back from the UI to the backend.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum46"&gt;  46:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum47"&gt;  47:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;The value to be formatted&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum48"&gt;  48:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;targetType&amp;quot;&amp;gt;The target type of the conversion&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum49"&gt;  49:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;parameter&amp;quot;&amp;gt;A format string to be used in the &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum50"&gt;  50:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// formatting of the value&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum51"&gt;  51:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;culture&amp;quot;&amp;gt;The culture to use for formatting&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum52"&gt;  52:&lt;/span&gt;         &lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;The converted or formatted object&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum53"&gt;  53:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; ConvertBack(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;, Type targetType, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; parameter, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum54"&gt;  54:&lt;/span&gt;             System.Globalization.CultureInfo culture)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum55"&gt;  55:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum56"&gt;  56:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; System.Convert.ToDateTime(&lt;span style="color: #0000ff"&gt;value&lt;/span&gt;, CultureInfo.CurrentUICulture);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum57"&gt;  57:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum58"&gt;  58:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum59"&gt;  59:&lt;/span&gt;         &lt;span style="color: #cc6633"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum60"&gt;  60:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum61"&gt;  61:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Next you need to Use template and set the following property in your DataGrid&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; AutoGenerateColumns=&lt;span style="color: #006080"&gt;&amp;quot;False&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Run the application now, you will not see anything in your default.aspx, because we have set the AutoGenerateColumns as False, so we have to write few bits of code to define our own Column Template for the DataGrid, I personally would prefer using the DataGrid.Column Template, as this gives me more control over the data and the design.&lt;/p&gt;

&lt;p&gt;Add the following code inside your DataGrid&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGrid.Columns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;                 &lt;span style="color: #008000"&gt;&amp;lt;!--First Name--&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;First Name&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn.CellTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding FirstName, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn.CellTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;                 &lt;span style="color: #008000"&gt;&amp;lt;!--End First Name--&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;                 &lt;span style="color: #008000"&gt;&amp;lt;!--Last Name--&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Last Name&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn.CellTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding LastName, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn.CellTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;                 &lt;span style="color: #008000"&gt;&amp;lt;!--End Last Name--&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;                 &lt;span style="color: #008000"&gt;&amp;lt;!--SkillSet--&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Skill Set&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn.CellTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding SkillSet, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn.CellTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;                 &lt;span style="color: #008000"&gt;&amp;lt;!--End SkillSet--&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;                 &lt;span style="color: #008000"&gt;&amp;lt;!--DOB--&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Date of Birth&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn.CellTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding DOB, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn.CellTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGridTemplateColumn&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt;                 &lt;span style="color: #008000"&gt;&amp;lt;!--End DOB--&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt;  38:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;data:DataGrid.Columns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Run the application.&lt;/p&gt;

&lt;p&gt;You can see the same output, except the Header text of DOB, you had when you had the AutoGenerateColumns=True, &lt;/p&gt;

&lt;p&gt;Now I am going to show how you can use your DateConverter.cs class to format your DateTime, to do so&lt;/p&gt;

&lt;p&gt;First you need to import the class which we are going to use to format the DateTime, and also we have to define the tag, this can be done by adding the following code in your UserControl Tag&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; xmlns:conv=&amp;quot;clr-namespace:DataGridDemo&amp;quot;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The completed UserControl Tag will look something like this as given below&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:data&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;DataGridDemo.Page&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;font color="#008000"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:conv&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:DataGridDemo&amp;quot;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;600&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Now add the following code in your XAML code just above your LayoutRoot Grid Layout&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;conv:DateConverter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FormatConverter&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Now you have all the required classes and tag defined for your DateConverter.cs, we have to specify the Column in which we are going to apply this format, as currently we are formatting the DateTime, so we have to apply this for our DOB column, by modifying the following code, as given below&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding DOB, Mode=TwoWay, Converter={StaticResource FormatConverter}, &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; ConverterParameter=\{0:D\}}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Now run your application you will get the following output&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/FinalScreen_2F6B5E9E.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Final Screen" border="0" alt="Final Screen" src="http://weblogs.asp.net/blogs/brijmohan/FinalScreen_thumb_04634ACC.jpg" width="620" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;In the screen above you can notice the Date of Birth date format, &lt;/p&gt;

&lt;p&gt;So these are the very basic example I had given here to use the Silverlight 2.0 DataGrid and format the data in the Silverlight 2.0 DataGrid. &lt;/p&gt;

&lt;p&gt;You can be more creative and can design the whole new look itself and can get the more control on the data using Silverlight 2.0 DataGrid control.&lt;/p&gt;

&lt;p&gt;You can download the source code of the complete solution from &lt;a href="You can download the source code of the complete solution from here" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7063315" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+3.5/default.aspx">Framework 3.5</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+2.0/default.aspx">Silverlight 2.0</category></item><item><title>Fixing Intellisense in Silverlight XAML Code</title><link>http://weblogs.asp.net/brijmohan/archive/2009/04/28/fixing-intellisense-in-silverlight-xaml-code.aspx</link><pubDate>Tue, 28 Apr 2009 06:54:58 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7063095</guid><dc:creator>mohanbrij</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=7063095</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2009/04/28/fixing-intellisense-in-silverlight-xaml-code.aspx#comments</comments><description>&lt;p&gt;For those who are facing the problems of intellisense not working for XAML files, please follow the steps below to fix that. &lt;/p&gt;  &lt;p&gt;1. Uninstall the Silverlight using the control panel snap in as given in the screenshot below. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotnetslackers.com/Community/blogs/bmdayal/WindowsLiveWriter/FixingIntellisenseinSilverlightXAMLCode_1332E/clip_image001_2.jpg"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="clip_image001" src="http://dotnetslackers.com/Community/blogs/bmdayal/WindowsLiveWriter/FixingIntellisenseinSilverlightXAMLCode_1332E/clip_image001_thumb.jpg" width="244" height="184" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;2. Download and Install the Silverlight Tools by clicking on the following location &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&amp;amp;displaylang=en&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;3. If you have installed Silverlight DataGrid 2008 Update, then re-installing the Silverlight Tools will delete all your files from your C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Client , so you will loose the DataGrid December 2008 update. So you will need to fix this again, details of which you can find in the below given link. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.net/forums/p/59990/176470.aspx"&gt;http://silverlight.net/forums/p/59990/176470.aspx&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;i&gt;FYI: This usually happens when Silverlight Toolkit is installed before the Visual Studio 2008 IDE, &lt;/i&gt;&lt;i&gt;Usually when we install Silverlight Toolkit, it installs the patch for Visual Studio 2008 IDE which enables intellisense. But in absence of VS2008 IDE, Silverlight Toolkit skips this patch.&lt;/i&gt; &lt;/p&gt;  &lt;p&gt;&lt;i&gt;This patch for intellisense will get installed only when it detects VS2008 IDE already installed in our Systems.&lt;/i&gt; &lt;/p&gt;  &lt;p&gt;I hope this helps. &lt;/p&gt;  &lt;p&gt;Cheers &lt;/p&gt;  &lt;p&gt;~Brij&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7063095" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+3.5/default.aspx">Framework 3.5</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+2.0/default.aspx">Silverlight 2.0</category></item><item><title>My Crush List of 2009</title><link>http://weblogs.asp.net/brijmohan/archive/2009/04/28/my-crush-list-of-2009.aspx</link><pubDate>Tue, 28 Apr 2009 06:50:26 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7063086</guid><dc:creator>mohanbrij</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=7063086</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2009/04/28/my-crush-list-of-2009.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;These are few things which currently I am working on and some technologies which I want to learn in coming months to master these technologies I need your help, &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So please post some good tutorials and articles on any of the following topics, if you have any. &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;1. Silverlight 2.0/3.0&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;2. Microsoft .NET 2008/2010 and Framework 3.5 SP1/4.0&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;3. Model View Presenter and Model View Controller Architecture&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;4. WCF, WSSF incuding Creating custom templates for Implementation Technologies, etc&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;5. Visual Studio SDK&lt;/p&gt;    &lt;p&gt;&lt;/p&gt;    &lt;p&gt;6. Visual Studio Database Projects (SQl Server 2008 and SQL Server 2005)&lt;/p&gt;    &lt;p&gt;&lt;/p&gt; 7. SQL Server 2008 new Features (Auditing, Change Data Capture and Change Data Tracking)&lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;There are some links which already I am following is given below: &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Automatic properties and Object initializers    &lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2007/03/08/new-c-orcas-language-features-automatic-properties-object-initializers-and-collection-initializers.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2007/03/08/new-c-orcas-language-features-automatic-properties-object-initializers-and-collection-initializers.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;LINQ Tutorials    &lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2006/05/14/446412.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2006/05/14/446412.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Lambda Expression    &lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2007/04/08/new-orcas-language-feature-lambda-expressions.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2007/04/08/new-orcas-language-feature-lambda-expressions.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;WSSF Home page    &lt;br /&gt;&lt;a href="http://www.codeplex.com/servicefactory"&gt;http://www.codeplex.com/servicefactory&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;WSSF Hands on Lab    &lt;br /&gt;&lt;a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=servicefactory&amp;amp;ReleaseId=7846"&gt;http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=servicefactory&amp;amp;ReleaseId=7846&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Thanks    &lt;br /&gt;Brij Mohan&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7063086" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+2.0/default.aspx">Framework 2.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+3.5/default.aspx">Framework 3.5</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Visual+Studio+SDK/default.aspx">Visual Studio SDK</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+3.0/default.aspx">Silverlight 3.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Silverlight+2.0/default.aspx">Silverlight 2.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+4.0/default.aspx">Framework 4.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/WCF/default.aspx">WCF</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/WSSF/default.aspx">WSSF</category></item><item><title>CSS Browser Selector</title><link>http://weblogs.asp.net/brijmohan/archive/2008/12/04/css-browser-selector.aspx</link><pubDate>Thu, 04 Dec 2008 17:45:55 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6765739</guid><dc:creator>mohanbrij</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=6765739</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2008/12/04/css-browser-selector.aspx#comments</comments><description>&lt;p&gt;While designing the webpage we often struggle to maintain the consistency of our site across different browsers. To achieve this we use different browser hacks. But again that ends up with making our programming more complicated. &lt;/p&gt;  &lt;p&gt;In this post I am going to give you the link of a JavaScript using which you just need to know basics of CSS. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://rafael.adm.br/css_browser_selector/" target="_blank"&gt;CSS Browser Selector&lt;/a&gt; is a very small JavaScript with just one line and less than 1kb which empower CSS selectors. It gives you the ability to write specific CSS code for each operating system and each browser. &lt;/p&gt;  &lt;p&gt;This can work for the following Browsers&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Internet Explorer (All versions) &lt;/li&gt;    &lt;li&gt;Mozilla, Firefox (all versions), Camino &lt;/li&gt;    &lt;li&gt;Opera (All versions) &lt;/li&gt;    &lt;li&gt;Konqueror &lt;/li&gt;    &lt;li&gt;Safari, NetNewsWire, OmniWeb, Shiira, Google Chrome &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I think we have almost covered all the browsers right, if I am missing any let me know.&lt;/p&gt;  &lt;p&gt;Instead of writing everything again here, and making this post lengthy I will suggest you to visit this site to &lt;a href="http://github.com/rafaelp/css_browser_selector.git/" target="_blank"&gt;download&lt;/a&gt; the &lt;a href="http://github.com/rafaelp/css_browser_selector.git/css_browser_selector.js" target="_blank"&gt;JavaScript&lt;/a&gt; code and &lt;a href="http://github.com/rafaelp/css_browser_selector.git/README.mkdn" target="_blank"&gt;instructions&lt;/a&gt; on how to use this from &lt;a href="http://rafael.adm.br/css_browser_selector/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6765739" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/CSS/default.aspx">CSS</category></item><item><title>Versioning ASP.NET 2.0 WebSite Assembly / Web Deployment Project</title><link>http://weblogs.asp.net/brijmohan/archive/2008/11/29/versioning-asp-net-2-0-website-assembly-web-deployment-project.aspx</link><pubDate>Sat, 29 Nov 2008 06:24:04 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6759595</guid><dc:creator>mohanbrij</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=6759595</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2008/11/29/versioning-asp-net-2-0-website-assembly-web-deployment-project.aspx#comments</comments><description>&lt;p&gt;The web project model changed in number of ways from Visual Studio 2003 to Visual Studio 2005, But one major part which is missing is the ability to version the assembly using AssemblyInfo.cs file.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;This is because the model of VS 2005 dynamically creates multiple assemblies for each class file. Resulting in which we cannot have single named assembly to set version number.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;We cannot change the default behaviour of compilation but we can change the way we can deploy our project files and assemblies, by using Web Deployment Project.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Microsoft Web Deployment Project adds numerous features which nicely integrates with Visual Studio 2005, out of which the most useful I found is:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;More control over number of assemblies generated by a pre-complied web application as well as control over the naming of the output assemblies. Which means you can generate either single assembly for you entire project, and select the name and version you want for e.g Foo.dll, etc or generate the assemblies per directory/ pages or control.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The ability to customize and modify the web.config file during deployment, that means you need not to change you web.config file every time before making release or deploying the project, instead you can specify the web.config keys on Web Deployment project, that you use for deployment, like this you can customize any other web.config settings also.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;These are the few things which I named here, if you want more information on how to install, and use this you can visit the Scott's Blog from the below link:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx" href="http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; Or you can Download the VS 2005 Web Deployment Project from   &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="WebDeploymentSetup.msi" href="http://download.microsoft.com/download/c/c/b/ccb4877f-55f7-4478-8f16-e41886607a0e/WebDeploymentSetup.msi"&gt;WebDeploymentSetup.msi&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Other Useful Links which may help you to further explore this subject&lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/aa479568.aspx" href="http://msdn.microsoft.com/en-us/library/aa479568.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa479568.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="Web Deployment Projects Forum" href="http://forums.asp.net/1020/ShowForum.aspx"&gt;Web Deployment Projects Forum&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I hope this will help you, if you have something to share on this topic, then please leave a comment.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Thanks&lt;/p&gt; ~Brij   &lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6759595" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+2.0/default.aspx">Framework 2.0</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/WebDeploymentProject/default.aspx">WebDeploymentProject</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Versioning/default.aspx">Versioning</category></item><item><title>Installing Sharepoint Services 3.0 on Windows Vista OS</title><link>http://weblogs.asp.net/brijmohan/archive/2008/11/22/installing-sharepoint-services-3-0-on-windows-vista-os.aspx</link><pubDate>Sat, 22 Nov 2008 07:56:37 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6750036</guid><dc:creator>mohanbrij</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=6750036</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2008/11/22/installing-sharepoint-services-3-0-on-windows-vista-os.aspx#comments</comments><description>&lt;p&gt;Just few days back I started exploring Sharepoint Technologies, and started thinking where to start. The biggest setback for me was I cannot run Sharepoint Services on my windows Vista System because Sharepoint Services can only be installed on Windows Server Family of Operating System. But now I cannot go back and repartition my System and install Sharepoint, I also tried using Windows Virtual Machine, but Windows Server 2003 was not working properly on my Windows Virtual Machine.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So now I am left with only two option either repartition the whole harddisk and install dual boot OS or Find some way to run windows sharepoint services on my windows vista. So I started googling and finally I found a jackpot where I can install sharepoint on Windows Vista. First I thought its one more bluff, but thought to give a try, and it worked, and now I am using Windows Sharepoint Services on my Windows Vista Ultimate OS.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Just follow the link below which will guide you step by step process how to do that.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/21/how-to-install-windows-sharepoint-services-3-0-sp1-on-vista-x64-x86.aspx" href="http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/21/how-to-install-windows-sharepoint-services-3-0-sp1-on-vista-x64-x86.aspx"&gt;http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/21/how-to-install-windows-sharepoint-services-3-0-sp1-on-vista-x64-x86.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;To download the setup helper file you can either download from the above link or you can download from &lt;a href="http://community.bamboosolutions.com/media/p/193/download.aspx" target="_blank"&gt;here&lt;/a&gt; directly.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Cheers&lt;/p&gt; ~Brij   &lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6750036" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Sharepoint+Services+3.0/default.aspx">Sharepoint Services 3.0</category></item><item><title>LINQ to XML and LINQ to Objects Basic Sample</title><link>http://weblogs.asp.net/brijmohan/archive/2008/11/22/linq-to-xml-and-linq-to-objects-basic-sample.aspx</link><pubDate>Sat, 22 Nov 2008 07:31:07 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6750018</guid><dc:creator>mohanbrij</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=6750018</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2008/11/22/linq-to-xml-and-linq-to-objects-basic-sample.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;In this post I will show how to use LINQ to XML and LINQ to Objects, very basic example with &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/TestAppBeta.zip" target="_blank"&gt;sample code&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/LINQtoXMLandLINQtoObjectBasics_14394/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="235" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/LINQtoXMLandLINQtoObjectBasics_14394/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;a href="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/LINQtoXMLandLINQtoObjectBasics_14394/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="235" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/LINQtoXMLandLINQtoObjectBasics_14394/image_thumb_1.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;First I have created a XML file which contains the Customer Details, as given below&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;?&amp;gt;      &lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;ALFKI&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Berlin&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;20&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;BONAP&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Marseille&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;21&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;CONSH&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;London&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;30&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;EASTC&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;London&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;34&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;FRANS&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Torino&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;35&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;LONEP&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Portland&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;40&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;NORTS&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;London&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;25&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;THEBI&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customerid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;Portland&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;city&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;36&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;age&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;customers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;&amp;#160;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;I have also created a class with the same properties which I have given in the XML document above, and populating the same data,&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer
&lt;/span&gt;{&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public string &lt;/span&gt;CustomerID { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public string &lt;/span&gt;City { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public int &lt;/span&gt;Age { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;&amp;gt; CreateCustomers()
{
   &lt;span style="color: blue"&gt;return new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;&amp;gt;
   {
      &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ CustomerID = &lt;span style="color: #a31515"&gt;&amp;quot;ALFKI&amp;quot;&lt;/span&gt;, City = &lt;span style="color: #a31515"&gt;&amp;quot;Berlin&amp;quot;&lt;/span&gt;, Age=20   },
      &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ CustomerID = &lt;span style="color: #a31515"&gt;&amp;quot;BONAP&amp;quot;&lt;/span&gt;, City = &lt;span style="color: #a31515"&gt;&amp;quot;Marseille&amp;quot; &lt;/span&gt;, Age=21},
      &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ CustomerID = &lt;span style="color: #a31515"&gt;&amp;quot;CONSH&amp;quot;&lt;/span&gt;, City = &lt;span style="color: #a31515"&gt;&amp;quot;London&amp;quot;&lt;/span&gt;, Age=30    },
      &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ CustomerID = &lt;span style="color: #a31515"&gt;&amp;quot;EASTC&amp;quot;&lt;/span&gt;, City = &lt;span style="color: #a31515"&gt;&amp;quot;London&amp;quot;&lt;/span&gt;, Age=34    },
      &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ CustomerID = &lt;span style="color: #a31515"&gt;&amp;quot;FRANS&amp;quot;&lt;/span&gt;, City = &lt;span style="color: #a31515"&gt;&amp;quot;Torino&amp;quot;&lt;/span&gt;, Age=35    },
      &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ CustomerID = &lt;span style="color: #a31515"&gt;&amp;quot;LONEP&amp;quot;&lt;/span&gt;, City = &lt;span style="color: #a31515"&gt;&amp;quot;Portland&amp;quot;&lt;/span&gt;, Age=40  },
      &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ CustomerID = &lt;span style="color: #a31515"&gt;&amp;quot;NORTS&amp;quot;&lt;/span&gt;, City = &lt;span style="color: #a31515"&gt;&amp;quot;London&amp;quot; &lt;/span&gt;, Age=25   },
      &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ CustomerID = &lt;span style="color: #a31515"&gt;&amp;quot;THEBI&amp;quot;&lt;/span&gt;, City = &lt;span style="color: #a31515"&gt;&amp;quot;Portland&amp;quot;&lt;/span&gt;, Age=26  }    
   };
 }&lt;/pre&gt;

&lt;pre class="code"&gt;}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Now I have got the Object ready to query using LINQ with the Same data which I have in my XML Document.&lt;/p&gt;

&lt;p&gt;Note above how I'm using the new &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/03/08/new-c-orcas-language-features-automatic-properties-object-initializers-and-collection-initializers.aspx"&gt;&amp;quot;Automatic Properties and Object Initializers&amp;quot;&lt;/a&gt; feature of C# to define the properties (and avoid having to define a field for them and initialize the Objects). And In all the functions below I am reading the XML Document, using XDocument Class within System.Xml.Linq namespace to open and query document.&lt;/p&gt;

&lt;p&gt;First I have to populate the DropDownList in the UI, to display all the Cities, I am reading the Cities from the object alternatively you can also read the same from XML document, both will return the same result. This DropDown will allow the users to select the customers located in the selected City.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;&amp;gt; GetCities()
{
     &lt;span style="color: blue"&gt;var &lt;/span&gt;customers = &lt;span style="color: blue"&gt;from &lt;/span&gt;customer &lt;span style="color: blue"&gt;in &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;.CreateCustomers()
                     &lt;span style="color: blue"&gt;orderby &lt;/span&gt;customer.City
                     &lt;span style="color: blue"&gt;select new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer &lt;/span&gt;{ City = customer.City };
     &lt;span style="color: blue"&gt;return &lt;/span&gt;customers.ToList();
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;I have also added one more DropDown to let the user to select the DataSource (XML or Object), once both the selection is made, users can click on Get Customers to Get the Customer details. Depending on the DataSource and City, the function below will return the List of Customers wither from XML or the Object.&lt;/p&gt;

&lt;p&gt;&amp;#160; &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;&amp;gt; GetCustomerFromXML(&lt;span style="color: blue"&gt;string &lt;/span&gt;city)
{
    &lt;span style="color: #2b91af"&gt;XDocument &lt;/span&gt;xmlDoc = &lt;span style="color: #2b91af"&gt;XDocument&lt;/span&gt;.Load(&lt;span style="color: #2b91af"&gt;HttpContext&lt;/span&gt;.Current.Server.MapPath(&lt;span style="color: #a31515"&gt;&amp;quot;CustomerXML.xml&amp;quot;&lt;/span&gt;));
    &lt;span style="color: blue"&gt;var &lt;/span&gt;customers = &lt;span style="color: blue"&gt;from &lt;/span&gt;customer &lt;span style="color: blue"&gt;in &lt;/span&gt;xmlDoc.Descendants(&lt;span style="color: #a31515"&gt;&amp;quot;customer&amp;quot;&lt;/span&gt;)
                    &lt;span style="color: blue"&gt;where &lt;/span&gt;customer.Element(&lt;span style="color: #a31515"&gt;&amp;quot;city&amp;quot;&lt;/span&gt;).Value == city
                    &lt;span style="color: blue"&gt;select new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer
                    &lt;/span&gt;{
                        CustomerID = customer.Element(&lt;span style="color: #a31515"&gt;&amp;quot;customerid&amp;quot;&lt;/span&gt;).Value,
                        City = customer.Element(&lt;span style="color: #a31515"&gt;&amp;quot;city&amp;quot;&lt;/span&gt;).Value,
                        Age = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToInt32(customer.Element(&lt;span style="color: #a31515"&gt;&amp;quot;age&amp;quot;&lt;/span&gt;).Value)
                    };
    &lt;span style="color: blue"&gt;return &lt;/span&gt;customers.ToList();
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Similarly I am writing the function below to read the object, and returning the List&amp;lt;Customer&amp;gt; which we can bind directly to the GridView.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;&amp;gt; GetCustomersFromObject(&lt;span style="color: blue"&gt;string &lt;/span&gt;city)
{
     &lt;span style="color: blue"&gt;var &lt;/span&gt;customers = &lt;span style="color: blue"&gt;from &lt;/span&gt;customer &lt;span style="color: blue"&gt;in &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;.CreateCustomers()
                     &lt;span style="color: blue"&gt;where &lt;/span&gt;customer.City == city
                     &lt;span style="color: blue"&gt;select new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Customer
                     &lt;/span&gt;{
                         CustomerID = customer.CustomerID,
                         City = customer.City,
                         Age = customer.Age
                     };
     &lt;span style="color: blue"&gt;return &lt;/span&gt;customers.ToList();
 }&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Note: In the functions above the only trick I've made to the LINQ to XML query is to use the &amp;quot;select new Customer&amp;quot; instead of only &amp;quot;select&amp;quot; clause from &amp;quot;select new&amp;quot; (with no type-name).&amp;#160; With this trick I'm returning a sequence of Customer objects that I can pass from class to class, assembly to assembly, and across web-services.&lt;/p&gt;

&lt;p&gt;In the code behind of ASPX Page first I have populated the Cities DropDown to List all the cities on Page_Load, then OnClick of the Get Customers&amp;#160; I have written the code to Get the City, and the DataSource from the DropDownList and Call the appropriate method depending on the DataSource.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;protected void &lt;/span&gt;Page_Load(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e)
{
    &lt;span style="color: blue"&gt;if &lt;/span&gt;(!IsPostBack)
    {
        &lt;span style="color: green"&gt;//get all the cities
        &lt;/span&gt;ddlCity.DataSource = &lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;.GetCities();
        ddlCity.DataTextField = &lt;span style="color: #a31515"&gt;&amp;quot;city&amp;quot;&lt;/span&gt;;
        ddlCity.DataValueField = &lt;span style="color: #a31515"&gt;&amp;quot;city&amp;quot;&lt;/span&gt;;
        ddlCity.DataBind();
    }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;protected void &lt;/span&gt;btnGetCustomers_Click(&lt;span style="color: blue"&gt;object &lt;/span&gt;sender, &lt;span style="color: #2b91af"&gt;EventArgs &lt;/span&gt;e)
{
    &lt;span style="color: green"&gt;//binding the Customer from Object
    &lt;/span&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(ddlSource.SelectedValue == &lt;span style="color: #a31515"&gt;&amp;quot;Object&amp;quot;&lt;/span&gt;)
    {
        gvCustomerDetails.Visible = &lt;span style="color: blue"&gt;true&lt;/span&gt;;
        lblMessage.Text = &lt;span style="color: #a31515"&gt;&amp;quot;Displaying data from Object&amp;quot;&lt;/span&gt;;
        gvCustomerDetails.DataSource = &lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;.GetCustomersFromObject(ddlCity.Text);
        gvCustomerDetails.DataBind();
    }
    &lt;span style="color: green"&gt;//binding the Customer from XML
    &lt;/span&gt;&lt;span style="color: blue"&gt;else if &lt;/span&gt;(ddlSource.SelectedValue == &lt;span style="color: #a31515"&gt;&amp;quot;XML&amp;quot;&lt;/span&gt;)
    {
        gvCustomerDetails.Visible = &lt;span style="color: blue"&gt;true&lt;/span&gt;;
        lblMessage.Text = &lt;span style="color: #a31515"&gt;&amp;quot;Displaying data from XML&amp;quot;&lt;/span&gt;;
        gvCustomerDetails.DataSource = &lt;span style="color: #2b91af"&gt;Customer&lt;/span&gt;.GetCustomerFromXML(ddlCity.Text);
        gvCustomerDetails.DataBind();
    }
    &lt;span style="color: blue"&gt;else
    &lt;/span&gt;{
        gvCustomerDetails.Visible = &lt;span style="color: blue"&gt;false&lt;/span&gt;;
        lblMessage.Text = &lt;span style="color: #a31515"&gt;&amp;quot;Please select the Data Source&amp;quot;&lt;/span&gt;;
    }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;Below is my ASPX code which is very much self explanatory, so I have not given much explanation for that, this just for the control name reference.&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;html &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;head &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;title&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;head&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;form &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;form1&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;h3&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &lt;/span&gt;LINQ to Object and LINQ to XML Demo&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;h3&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;table&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;tr&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;label &lt;/span&gt;&lt;span style="color: red"&gt;for&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;source&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;lblSource&amp;quot;&amp;gt;
                        &lt;/span&gt;Data Source :&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;label&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;DropDownList &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;ddlSource&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot;&amp;gt;
                        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListItem &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Select Source&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;0&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Selected&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;True&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListItem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListItem &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;XML&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;XML&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListItem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListItem &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Object&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Object&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListItem&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;DropDownList&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;tr&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;tr&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;label &lt;/span&gt;&lt;span style="color: red"&gt;for&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;empid&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;id&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;lblEmp&amp;quot;&amp;gt;
                        &lt;/span&gt;Select City :&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;label&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;DropDownList &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;ddlCity&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;DropDownList&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
                &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Button &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;btnGetCustomers&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Get Customers&amp;quot; 
                        &lt;/span&gt;&lt;span style="color: red"&gt;onclick&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;btnGetCustomers_Click&amp;quot; /&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;td&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
            &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;tr&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;table&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;br &lt;/span&gt;&lt;span style="color: blue"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Label &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;lblMessage&amp;quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Label&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;br &lt;/span&gt;&lt;span style="color: blue"&gt;/&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;GridView &lt;/span&gt;&lt;span style="color: red"&gt;ID&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;gvCustomerDetails&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;runat&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;server&amp;quot;&amp;gt;
        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;asp&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;GridView&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;div&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;form&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;body&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;html&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;pre class="code"&gt;&amp;#160;&lt;/pre&gt;

&lt;p&gt;You can download the &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/TestAppBeta.zip" target="_blank"&gt;sample code&lt;/a&gt; from &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/TestAppBeta.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can refer my &lt;a href="http://weblogs.asp.net/brijmohan/archive/2008/10/26/twoselect-user-control-moving-items-between-listbox-controls-part-2.aspx" target="_blank"&gt;previous posts&lt;/a&gt;, to see the Example of &lt;a href="http://weblogs.asp.net/brijmohan/archive/2008/10/26/twoselect-user-control-moving-items-between-listbox-controls-part-2.aspx" target="_blank"&gt;LINQ To SQL&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;For more knowledge you can refer the post below.&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://weblogs.asp.net/scottgu/archive/2007/08/07/using-linq-to-xml-and-how-to-build-a-custom-rss-feed-reader-with-it.aspx" href="http://weblogs.asp.net/scottgu/archive/2007/08/07/using-linq-to-xml-and-how-to-build-a-custom-rss-feed-reader-with-it.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2007/08/07/using-linq-to-xml-and-how-to-build-a-custom-rss-feed-reader-with-it.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a title="http://www.c-sharpcorner.com/UploadFile/scottlysle/L2OinCS05242008233051PM/L2OinCS.aspx" href="http://www.c-sharpcorner.com/UploadFile/scottlysle/L2OinCS05242008233051PM/L2OinCS.aspx"&gt;http://www.c-sharpcorner.com/UploadFile/scottlysle/L2OinCS05242008233051PM/L2OinCS.aspx&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6750018" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Framework+3.5/default.aspx">Framework 3.5</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>TwoSelect User Control, Moving Items between ListBox Controls - Part 2</title><link>http://weblogs.asp.net/brijmohan/archive/2008/10/26/twoselect-user-control-moving-items-between-listbox-controls-part-2.aspx</link><pubDate>Sun, 26 Oct 2008 12:26:18 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6704701</guid><dc:creator>mohanbrij</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=6704701</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2008/10/26/twoselect-user-control-moving-items-between-listbox-controls-part-2.aspx#comments</comments><description>&lt;p&gt;As I promised in this post I am showing you how to implement TwoSelect Control, which I created in my &lt;a href="http://weblogs.asp.net/brijmohan/archive/2008/10/26/twoselect-user-control-moving-items-between-listbox-controls-part-1.aspx" target="_blank"&gt;Previous Post&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You can download the Complete Source with implementation from &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/TwoSelectImplementation.zip" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In this post to get the Available Users and Added Users I am fetching from DataBase using LINQ to SQL, but you can also use either sql or Stored Procedure as per your convenience.&lt;/p&gt; &lt;p&gt;So the first step in Consuming this control in our code is by Creating the Tables, whose structure will look something like this&lt;/p&gt; &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/TwoSelectUserControlMovingItemsbetweenLi_EFFF/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="253" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/TwoSelectUserControlMovingItemsbetweenLi_EFFF/image_thumb_1.png" width="460" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;In the User Table I have stored all the User Information, in Group Table I have stored all the Group Details and in UserGroup Table I have related the User and Groups.&lt;/p&gt; &lt;p&gt;In the current project I have not given any screen to enter the User Details or Group Details, as this was out of scope of the current topics, so you can insert the User and Group directly in the Database Tables.&lt;/p&gt; &lt;p&gt;Secondly, Now coming to .NET Code, first I have created a LINQ to SQL and named this as UserGroupData.dbml, and added all the three tables into the designer.&lt;/p&gt; &lt;p&gt;After this I have added the Class to Handle the Data from LINQ to SQL and pass the data to Presentation Layer.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In the below given code snippet I am Retriving all the User who is already present in the Group, this function accepts the groupId as input parameter and return IDataReader to the Presentation Layer, so that we can pass the DataReader directly to the DataSourceAdded Property of the TwoSelect Control and Bind the Data to the Added Users ListBox.&lt;/p&gt; &lt;p&gt; &lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt; &lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt; &lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Code Snippet&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; Gets the group user.&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="groupId"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The group id.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/returns&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;public&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #000000"&gt; GetGroupUser(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;int&lt;/span&gt;&lt;span style="color: #000000"&gt; groupId)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroupDataDataContext&lt;/span&gt;&lt;span style="color: #000000"&gt; data = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroupDataDataContext&lt;/span&gt;&lt;span style="color: #000000"&gt;();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;var&lt;/span&gt;&lt;span style="color: #000000"&gt; user = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;from&lt;/span&gt;&lt;span style="color: #000000"&gt; Grp &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; data.Groups&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;join&lt;/span&gt;&lt;span style="color: #000000"&gt; UsrGrp &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; data.UserGroups &lt;/span&gt;&lt;span style="color: #2b91af"&gt;on&lt;/span&gt;&lt;span style="color: #000000"&gt; Grp.GroupId &lt;/span&gt;&lt;span style="color: #2b91af"&gt;equals&lt;/span&gt;&lt;span style="color: #000000"&gt; UsrGrp.GroupId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;join&lt;/span&gt;&lt;span style="color: #000000"&gt; Usr &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; data.Users &lt;/span&gt;&lt;span style="color: #2b91af"&gt;on&lt;/span&gt;&lt;span style="color: #000000"&gt; UsrGrp.UserId &lt;/span&gt;&lt;span style="color: #2b91af"&gt;equals&lt;/span&gt;&lt;span style="color: #000000"&gt; Usr.UserId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;where&lt;/span&gt;&lt;span style="color: #000000"&gt; Grp.GroupId == groupId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;orderby&lt;/span&gt;&lt;span style="color: #000000"&gt; Usr.UserId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;14:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;select&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;15:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;                       {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;16:&lt;/font&gt;&amp;nbsp;&amp;nbsp; UserName = Usr.UserName,&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;17:&lt;/font&gt;&amp;nbsp;&amp;nbsp; GroupName = Grp.GroupName,&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;18:&lt;/font&gt;&amp;nbsp;&amp;nbsp; UserId = Usr.UserId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;19:&lt;/font&gt;&amp;nbsp;&amp;nbsp; };&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;20:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDbCommand&lt;/span&gt;&lt;span style="color: #000000"&gt; command = data.GetCommand(user);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;21:&lt;/font&gt;&amp;nbsp;&amp;nbsp; command.Connection = data.Connection;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;22:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt;(command.Connection.State == &lt;/span&gt;&lt;span style="color: #ff0000"&gt;ConnectionState&lt;/span&gt;&lt;span style="color: #000000"&gt;.Closed)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;23:&lt;/font&gt;&amp;nbsp;&amp;nbsp; command.Connection.Open();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;24:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #000000"&gt; reader = command.ExecuteReader(&lt;/span&gt;&lt;span style="color: #ff0000"&gt;CommandBehavior&lt;/span&gt;&lt;span style="color: #000000"&gt;.CloseConnection);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;25:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;return&lt;/span&gt;&lt;span style="color: #000000"&gt; reader;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;26:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the below given code snippet I am Retriving all the User who not present in the Group, this function accepts the groupId as input parameter and return IDataReader to the Presentation Layer, so that we can pass the DataReader directly to the DataSourceAvailable Property of the TwoSelect Control and Bind the Data to the Available Users ListBox.&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;
&lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt;
&lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Code Snippet&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; Users not in the selected group.&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="groupId"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The group id.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/returns&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;public&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #000000"&gt; UserNotInGroup(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;int&lt;/span&gt;&lt;span style="color: #000000"&gt; groupId)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroupDataDataContext&lt;/span&gt;&lt;span style="color: #000000"&gt; data = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroupDataDataContext&lt;/span&gt;&lt;span style="color: #000000"&gt;();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;var&lt;/span&gt;&lt;span style="color: #000000"&gt; user = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;from&lt;/span&gt;&lt;span style="color: #000000"&gt; Grp &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; data.Groups&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;join&lt;/span&gt;&lt;span style="color: #000000"&gt; UsrGrp &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; data.UserGroups &lt;/span&gt;&lt;span style="color: #2b91af"&gt;on&lt;/span&gt;&lt;span style="color: #000000"&gt; Grp.GroupId &lt;/span&gt;&lt;span style="color: #2b91af"&gt;equals&lt;/span&gt;&lt;span style="color: #000000"&gt; UsrGrp.GroupId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;join&lt;/span&gt;&lt;span style="color: #000000"&gt; Usr &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; data.Users &lt;/span&gt;&lt;span style="color: #2b91af"&gt;on&lt;/span&gt;&lt;span style="color: #000000"&gt; UsrGrp.UserId &lt;/span&gt;&lt;span style="color: #2b91af"&gt;equals&lt;/span&gt;&lt;span style="color: #000000"&gt; Usr.UserId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;where&lt;/span&gt;&lt;span style="color: #000000"&gt; Grp.GroupId != groupId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;orderby&lt;/span&gt;&lt;span style="color: #000000"&gt; Usr.UserId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;14:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;select&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;15:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;                       {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;16:&lt;/font&gt;&amp;nbsp;&amp;nbsp; UserName = Usr.UserName,&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;17:&lt;/font&gt;&amp;nbsp;&amp;nbsp; GroupName = Grp.GroupName,&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;18:&lt;/font&gt;&amp;nbsp;&amp;nbsp; UserId = Usr.UserId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;19:&lt;/font&gt;&amp;nbsp;&amp;nbsp; };&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;20:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDbCommand&lt;/span&gt;&lt;span style="color: #000000"&gt; command = data.GetCommand(user);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;21:&lt;/font&gt;&amp;nbsp;&amp;nbsp; command.Connection = data.Connection;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;22:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt;(command.Connection.State == &lt;/span&gt;&lt;span style="color: #ff0000"&gt;ConnectionState&lt;/span&gt;&lt;span style="color: #000000"&gt;.Closed)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;23:&lt;/font&gt;&amp;nbsp;&amp;nbsp; command.Connection.Open();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;24:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #000000"&gt; reader = command.ExecuteReader(&lt;/span&gt;&lt;span style="color: #ff0000"&gt;CommandBehavior&lt;/span&gt;&lt;span style="color: #000000"&gt;.CloseConnection);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;25:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;return&lt;/span&gt;&lt;span style="color: #000000"&gt; reader;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;26:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The function below will get all the Group names and Bind the Group DropDown, to display all the Groups so that we can select the Groups whose user I want to manage.&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;
&lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt;
&lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Code Snippet&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; Gets all group.&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/returns&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;public&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #000000"&gt; GetAllGroup()&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroupDataDataContext&lt;/span&gt;&lt;span style="color: #000000"&gt; data = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroupDataDataContext&lt;/span&gt;&lt;span style="color: #000000"&gt;();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;var&lt;/span&gt;&lt;span style="color: #000000"&gt; groups = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;from&lt;/span&gt;&lt;span style="color: #000000"&gt; Grp &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; data.Groups &lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;orderby&lt;/span&gt;&lt;span style="color: #000000"&gt; Grp.GroupName &lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;select&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp;&amp;nbsp; { &lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp;&amp;nbsp; GroupId = Grp.GroupId, &lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp;&amp;nbsp; GroupName = Grp.GroupName &lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;14:&lt;/font&gt;&amp;nbsp;&amp;nbsp; };&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;15:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDbCommand&lt;/span&gt;&lt;span style="color: #000000"&gt; command = data.GetCommand(groups);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;16:&lt;/font&gt;&amp;nbsp;&amp;nbsp; command.Connection = data.Connection;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;17:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (command.Connection.State == &lt;/span&gt;&lt;span style="color: #ff0000"&gt;ConnectionState&lt;/span&gt;&lt;span style="color: #000000"&gt;.Closed)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;18:&lt;/font&gt;&amp;nbsp;&amp;nbsp; command.Connection.Open();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;19:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;IDataReader&lt;/span&gt;&lt;span style="color: #000000"&gt; reader = command.ExecuteReader(&lt;/span&gt;&lt;span style="color: #ff0000"&gt;CommandBehavior&lt;/span&gt;&lt;span style="color: #000000"&gt;.CloseConnection);&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;20:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;return&lt;/span&gt;&lt;span style="color: #000000"&gt; reader;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;21:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This function will update the DataBase once we have selected the Users in a particular Group.&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;
&lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt;
&lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Code Snippet&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; Saves the group user.&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="group"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The group.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;public&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; SaveGroupUser(&lt;/span&gt;&lt;span style="color: #ff0000"&gt;List&lt;/span&gt;&lt;span style="color: #000000"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroup&lt;/span&gt;&lt;span style="color: #000000"&gt;&amp;gt; usrGroup)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroupDataDataContext&lt;/span&gt;&lt;span style="color: #000000"&gt; data = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroupDataDataContext&lt;/span&gt;&lt;span style="color: #000000"&gt;();&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;//first delete all the existing user data from User Group&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #ff0000"&gt;UserGroup&lt;/span&gt;&lt;span style="color: #000000"&gt; match &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; usrGroup)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;var&lt;/span&gt;&lt;span style="color: #000000"&gt; deleteUserGroup = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;from&lt;/span&gt;&lt;span style="color: #000000"&gt; userGroups &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; data.UserGroups&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;where&lt;/span&gt;&lt;span style="color: #000000"&gt; userGroups.UserId == match.UserId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;select&lt;/span&gt;&lt;span style="color: #000000"&gt; userGroups;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;14:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #2b91af"&gt;var&lt;/span&gt;&lt;span style="color: #000000"&gt; userGroup &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; deleteUserGroup)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;15:&lt;/font&gt;&amp;nbsp;&amp;nbsp; data.UserGroups.DeleteOnSubmit(userGroup);&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;16:&lt;/font&gt;&amp;nbsp;&amp;nbsp; data.SubmitChanges();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;17:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;18:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;//MISSING : Logic to implement Save new Data related to User and Group&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;19:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;           &lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;20:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The same things you can do without using the LINQ to SQL either by writing the Stored Procedure or using the SQL Queries.&lt;/p&gt;
&lt;p&gt;I am giving below the sample stored procedure which can replace the function &lt;strong&gt;GetGroupUser&lt;/strong&gt; and &lt;strong&gt;GetUserNoInGroup&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;GetGroupUser&lt;/u&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; ANSI_NULLS &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; QUOTED_IDENTIFIER &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;CREATE&lt;/span&gt; &lt;span class="kwrd"&gt;PROCEDURE&lt;/span&gt; [dbo].[GetGroupUser]&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    (&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    @GroupId &lt;span class="kwrd"&gt;int&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    )&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&lt;span class="kwrd"&gt;AS&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    &lt;span class="kwrd"&gt;SET&lt;/span&gt; NOCOUNT &lt;span class="kwrd"&gt;ON&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;    &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;    &lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;        Usr.UserName, &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;        Grp.GroupName,&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        Usr.UserId &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;    &lt;span class="kwrd"&gt;From&lt;/span&gt;  &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;        GROUPS Grp&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;    &lt;span class="kwrd"&gt;INNER&lt;/span&gt; &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;        UserGroup UsrGrp&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;    &lt;span class="kwrd"&gt;ON&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;        Grp.GroupId = UsrGrp.GroupId&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;    &lt;span class="kwrd"&gt;INNER&lt;/span&gt; &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; USERS Usr &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;        UsrGrp.UserId = Usr.UserId&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;    &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;        Grp.GroupId=@GroupId&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;    &lt;span class="kwrd"&gt;ORDER&lt;/span&gt; &lt;span class="kwrd"&gt;BY&lt;/span&gt; Usr.UserId&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;    &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;    &lt;span class="kwrd"&gt;RETURN&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;u&gt;GetUserNotInGroup&lt;/u&gt;&lt;/strong&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; ANSI_NULLS &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;SET&lt;/span&gt; QUOTED_IDENTIFIER &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&lt;span class="kwrd"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;ALTER&lt;/span&gt; &lt;span class="kwrd"&gt;PROCEDURE&lt;/span&gt; [dbo].[UserNotInGroup]&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    (&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    @GroupId &lt;span class="kwrd"&gt;int&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    )&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&lt;span class="kwrd"&gt;AS&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    &lt;span class="kwrd"&gt;SET&lt;/span&gt; NOCOUNT &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;    &lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;        Usr.UserName,&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;        Usr.UserId, &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;        Grp.GroupName &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;    &lt;span class="kwrd"&gt;From&lt;/span&gt;  &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;        GROUPS Grp&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;    &lt;span class="kwrd"&gt;INNER&lt;/span&gt; &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        UserGroup UsrGrp&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;    &lt;span class="kwrd"&gt;ON&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;        Grp.GroupId = UsrGrp.GroupId&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;    &lt;span class="kwrd"&gt;INNER&lt;/span&gt; &lt;span class="kwrd"&gt;JOIN&lt;/span&gt; USERS Usr &lt;span class="kwrd"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;        UsrGrp.UserId = Usr.UserId&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;    &lt;span class="kwrd"&gt;WHERE&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;        Grp.GroupId!=@GroupId&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;    &lt;span class="kwrd"&gt;ORDER&lt;/span&gt; &lt;span class="kwrd"&gt;BY&lt;/span&gt; Usr.UserId&lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;    &lt;/pre&gt;&lt;/div&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;    &lt;span class="kwrd"&gt;RETURN&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Third, I have included the UserControl in my Project, and added in Default.asp page simply by Drag and Drop.&lt;/p&gt;
&lt;p&gt;Also I have added one DropDown Control to get the List of all the Groups and Added a Save Button to Save the Changes back to the database.&lt;/p&gt;
&lt;p&gt;After designing the Page will look something similar to this&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/TwoSelectUserControlMovingItemsbetweenLi_755/image_2.png"&gt;&lt;img height="349" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/TwoSelectUserControlMovingItemsbetweenLi_755/image_thumb.png" width="460" align="left" border="0"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;&lt;span style="color: #000000"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;&lt;span style="color: #000000"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;&lt;span style="color: #000000"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;&lt;span style="color: #000000"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;&lt;span style="color: #000000"&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;Now in Code Behind I tried to implement only the logic which is related to the TwoSelect User controls, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;
&lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt;
&lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Code Snippet&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;public&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;partial&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;class&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #808080"&gt;_Default&lt;/span&gt;&lt;span style="color: #000000"&gt; : System.Web.UI.&lt;/span&gt;&lt;span style="color: #808080"&gt;Page&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;    {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #808080"&gt;UserData&lt;/span&gt;&lt;span style="color: #000000"&gt; data = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #808080"&gt;UserData&lt;/span&gt;&lt;span style="color: #000000"&gt;();&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;private&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;int&lt;/span&gt;&lt;span style="color: #000000"&gt; GetGroupId&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;get&lt;/span&gt;&lt;span style="color: #000000"&gt; { &lt;/span&gt;&lt;span style="color: #2b91af"&gt;return&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #808080"&gt;Convert&lt;/span&gt;&lt;span style="color: #000000"&gt;.ToInt32(ddlGroup.SelectedValue); }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; Handles the Load event of the Page control.&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="sender"&amp;gt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;The source of the event.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="e"&amp;gt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;The &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;see cref="System.EventArgs"/&amp;gt;&lt;/span&gt;&lt;span style="color: #a31515"&gt; instance containing the event data.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; Page_Load(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, &lt;/span&gt;&lt;span style="color: #808080"&gt;EventArgs&lt;/span&gt;&lt;span style="color: #000000"&gt; e)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;14:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;15:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (!IsPostBack)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;16:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;17:&lt;/font&gt;&amp;nbsp;&amp;nbsp; ddlGroup.DataSource = data.GetAllGroup();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;18:&lt;/font&gt;&amp;nbsp;&amp;nbsp; ddlGroup.DataTextField = &lt;/span&gt;&lt;span style="color: #ffff00"&gt;"GroupName"&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;19:&lt;/font&gt;&amp;nbsp;&amp;nbsp; ddlGroup.DataValueField = &lt;/span&gt;&lt;span style="color: #ffff00"&gt;"GroupId"&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;20:&lt;/font&gt;&amp;nbsp;&amp;nbsp; ddlGroup.DataBind();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;21:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #808080"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt; item = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #808080"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt;();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;22:&lt;/font&gt;&amp;nbsp;&amp;nbsp; item.Text = &lt;/span&gt;&lt;span style="color: #ffff00"&gt;"Please Select"&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;23:&lt;/font&gt;&amp;nbsp;&amp;nbsp; item.Value = &lt;/span&gt;&lt;span style="color: #ffff00"&gt;"0"&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;24:&lt;/font&gt;&amp;nbsp;&amp;nbsp; ddlGroup.Items.Insert(0,item);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;25:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;26:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;27:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; ddlGroup_SelectedIndexChanged(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, &lt;/span&gt;&lt;span style="color: #808080"&gt;EventArgs&lt;/span&gt;&lt;span style="color: #000000"&gt; e)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;28:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;29:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #a31515"&gt;//Bind the User Control Available List Box&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;30:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;            uclTwoSelect.DataSourceAvailable = data.GetGroupUser(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;this&lt;/span&gt;&lt;span style="color: #000000"&gt;.GetGroupId);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;31:&lt;/font&gt;&amp;nbsp;&amp;nbsp; uclTwoSelect.DataTextFieldAvailable = &lt;/span&gt;&lt;span style="color: #ffff00"&gt;"UserName"&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;32:&lt;/font&gt;&amp;nbsp;&amp;nbsp; uclTwoSelect.DataValueFieldAvailable = &lt;/span&gt;&lt;span style="color: #ffff00"&gt;"UserId"&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;33:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #a31515"&gt;//Bind the User Control User Already Added List Box&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;34:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;            uclTwoSelect.DataSourceAdded = data.UserNotInGroup(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;this&lt;/span&gt;&lt;span style="color: #000000"&gt;.GetGroupId);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;35:&lt;/font&gt;&amp;nbsp;&amp;nbsp; uclTwoSelect.DataTextFieldAdded = &lt;/span&gt;&lt;span style="color: #ffff00"&gt;"UserName"&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;36:&lt;/font&gt;&amp;nbsp;&amp;nbsp; uclTwoSelect.DataValueFieldAdded = &lt;/span&gt;&lt;span style="color: #ffff00"&gt;"UserId"&lt;/span&gt;&lt;span style="color: #000000"&gt;;&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;37:&lt;/font&gt;&amp;nbsp;&amp;nbsp; uclTwoSelect.BindControl();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;38:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;39:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;40:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; Saves the User associated with the Groups.&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;41:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;42:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="sender"&amp;gt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;The source of the event.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;43:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #a31515"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="e"&amp;gt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;The &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;see cref="System.EventArgs"/&amp;gt;&lt;/span&gt;&lt;span style="color: #a31515"&gt; instance containing the event data.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;44:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt;        &lt;/span&gt;&lt;span style="color: #2b91af"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; btnSave_Click(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, &lt;/span&gt;&lt;span style="color: #808080"&gt;EventArgs&lt;/span&gt;&lt;span style="color: #000000"&gt; e)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;45:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;46:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #808080"&gt;UserGroup&lt;/span&gt;&lt;span style="color: #000000"&gt; user = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #808080"&gt;UserGroup&lt;/span&gt;&lt;span style="color: #000000"&gt;();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;47:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #808080"&gt;List&lt;/span&gt;&lt;span style="color: #000000"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #808080"&gt;UserGroup&lt;/span&gt;&lt;span style="color: #000000"&gt;&amp;gt; group = &lt;/span&gt;&lt;span style="color: #2b91af"&gt;new&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #808080"&gt;List&lt;/span&gt;&lt;span style="color: #000000"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #808080"&gt;UserGroup&lt;/span&gt;&lt;span style="color: #000000"&gt;&amp;gt;();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;48:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #808080"&gt;ListItemCollection&lt;/span&gt;&lt;span style="color: #000000"&gt; userGroup = uclTwoSelect.AddedItems;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;49:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #808080"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt; item &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; userGroup)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;50:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;51:&lt;/font&gt;&amp;nbsp;&amp;nbsp; user.GroupId = &lt;/span&gt;&lt;span style="color: #808080"&gt;Convert&lt;/span&gt;&lt;span style="color: #000000"&gt;.ToInt32(ddlGroup.SelectedValue);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;52:&lt;/font&gt;&amp;nbsp;&amp;nbsp; user.UserId = &lt;/span&gt;&lt;span style="color: #808080"&gt;Convert&lt;/span&gt;&lt;span style="color: #000000"&gt;.ToInt32(item.Value);&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;53:&lt;/font&gt;&amp;nbsp;&amp;nbsp; group.Add(user);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;54:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;55:&lt;/font&gt;&amp;nbsp;&amp;nbsp; data.SaveGroupUser(group);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;56:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;57:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;You can see in the code above I am binding the DropDown List of the Group and on SelectedIndexChanged even of the DropDown I am Binding the twoSelect Controls Data, with the DataSourceAvailable and DataSourceAdded Properties.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;This is just the one of the implementation you can &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/TwoSelectImplementation.zip" target="_blank"&gt;download&lt;/a&gt; the Control and its implementation code from &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/TwoSelectImplementation.zip" target="_blank"&gt;here&lt;/a&gt; and Enhance the Control.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;References &lt;/p&gt;
&lt;p&gt;&lt;a title="http://www.west-wind.com/WebLog/posts/141435.aspx" href="http://www.west-wind.com/WebLog/posts/141435.aspx"&gt;http://www.west-wind.com/WebLog/posts/141435.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listbox.aspx" href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listbox.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listbox.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/fb3w5b53(VS.85).aspx" href="http://msdn.microsoft.com/en-us/library/fb3w5b53(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/fb3w5b53(VS.85).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brij Mohan&lt;/p&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6704701" width="1" height="1"&gt;</description></item><item><title>TwoSelect User Control, Moving Items between ListBox Controls - Part 1</title><link>http://weblogs.asp.net/brijmohan/archive/2008/10/26/twoselect-user-control-moving-items-between-listbox-controls-part-1.aspx</link><pubDate>Sun, 26 Oct 2008 10:48:19 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6704625</guid><dc:creator>mohanbrij</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=6704625</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2008/10/26/twoselect-user-control-moving-items-between-listbox-controls-part-1.aspx#comments</comments><description>&lt;p&gt;This post will show you how to create TwoSelect User control, basically this control can be used in the scenario where you want to add Users to selected Group. Left side of the ListBox will contain the users which is not present in the group and right side of the ListBox contains the list of users already present in the group.&lt;/p&gt; &lt;p&gt;I have created this as a very Generic control which can be used in other scenarios other then this also. You can customize the Display Text, button captions, some behaviours of the ListBox of this Control. &lt;/p&gt; &lt;p&gt;Also you need to provide the DataSource for the ListBoxes as IDataReader.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/TwoSelectUserControlMovingItemsbetweenLi_755/image_2.png" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="349" alt="image" src="http://weblogs.asp.net/blogs/brijmohan/WindowsLiveWriter/TwoSelectUserControlMovingItemsbetweenLi_755/image_thumb.png" width="460" align="left" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This control is built in Visual Studio 2008 with Framework 3.5 sp1, but this can be used in Visual Studio 2005 or Framework 2.0 also.&lt;/p&gt; &lt;p&gt;Following are the list of properties which are exposed in this control with their Types&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ListItemCollection AddedItems&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ListItemCollection AvailableItems&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; AvailableItemText&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; AddedItemsText&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; AddAllItemsButtonText&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; AddSelectedItemsButtonText&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; RemoveSelectedItemButtonText&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; RemoveAllItemsButtonText&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ListSelectionMode AvailableListSelectionMode&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; ListSelectionMode AddedItemsListSelectionMode&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; IDataReader  DataSourceAvailable&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; IDataReader DataSourceAdded&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; DataTextFieldAvailable&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; DataValueFieldAvailable&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; DataTextFieldAdded&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; DataValueFieldAdded&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;
&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On click of the 'Add' Button, I am adding the items in the ArrayList and then from ArrayList I am moving from Available Items List Box to Added Items ListBox.&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;
&lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt;
&lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Add OnClick&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; Add all the selected items from the Available Items to the Added Items&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp; /&lt;/span&gt;&lt;span style="color: #008000"&gt;//&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="sender"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The source of the event.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="e"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;see cref="System.EventArgs"/&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt; instance containing the event data.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; btnAdd_Click(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, &lt;/span&gt;&lt;span style="color: #ff0000"&gt;EventArgs&lt;/span&gt;&lt;span style="color: #000000"&gt; e)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (lstAvailable.SelectedIndex &amp;gt;= 0)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;for&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #2b91af"&gt;int&lt;/span&gt;&lt;span style="color: #000000"&gt; i = 0; i &amp;lt; lstAvailable.Items.Count; i++)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (lstAvailable.Items[i].Selected)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;14:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (!arlList.Contains(lstAvailable.Items[i]))&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;15:&lt;/font&gt;&amp;nbsp;&amp;nbsp; arlList.Add(lstAvailable.Items[i]);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;16:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;17:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;18:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;for&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #2b91af"&gt;int&lt;/span&gt;&lt;span style="color: #000000"&gt; i = 0; i &amp;lt; arlList.Count; i++)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;19:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;20:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (!lstAdded.Items.Contains((&lt;/span&gt;&lt;span style="color: #ff0000"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt;)arlList[i]))&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;21:&lt;/font&gt;&amp;nbsp;&amp;nbsp; lstAdded.Items.Add((&lt;/span&gt;&lt;span style="color: #ff0000"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt;)arlList[i]);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;22:&lt;/font&gt;&amp;nbsp;&amp;nbsp; lstAvailable.Items.Remove((&lt;/span&gt;&lt;span style="color: #ff0000"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt;)arlList[i]);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;23:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;24:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;25:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On Click of 'Add All' I am first adding all the items from Available Items to Added Items ListBox, and then clearing all the items from the Available Items ListBox&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;
&lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt;
&lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Code Snippet&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; Add all the items from the Available items to the Added Items&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="sender"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The source of the event.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="e"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;see cref="System.EventArgs"/&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt; instance containing the event data.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; btnAddAll_Click(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, &lt;/span&gt;&lt;span style="color: #ff0000"&gt;EventArgs&lt;/span&gt;&lt;span style="color: #000000"&gt; e)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #ff0000"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt; list &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; lstAvailable.Items)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp;&amp;nbsp; lstAdded.Items.Add(list);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp;&amp;nbsp; lstAvailable.Items.Clear();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On click of the 'Remove' Button, I am adding the items in the ArrayList and then from ArrayList I am moving from Added Items List Box back to Available Items ListBox.&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;
&lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt;
&lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Code Snippet&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; Moves the Selected items from the Added items to the Available items&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp; /&lt;/span&gt;&lt;span style="color: #008000"&gt;//&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="sender"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The source of the event.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="e"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;see cref="System.EventArgs"/&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt; instance containing the event data.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; btnRemove_Click(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, &lt;/span&gt;&lt;span style="color: #ff0000"&gt;EventArgs&lt;/span&gt;&lt;span style="color: #000000"&gt; e)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (lstAdded.SelectedIndex &amp;gt;= 0)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;for&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #2b91af"&gt;int&lt;/span&gt;&lt;span style="color: #000000"&gt; i = 0; i &amp;lt; lstAdded.Items.Count; i++)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (lstAdded.Items[i].Selected)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;14:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (!arlList.Contains(lstAdded.Items[i]))&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;15:&lt;/font&gt;&amp;nbsp;&amp;nbsp; arlList.Add(lstAdded.Items[i]);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;16:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;17:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;18:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;for&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #2b91af"&gt;int&lt;/span&gt;&lt;span style="color: #000000"&gt; i = 0; i &amp;lt; arlList.Count; i++)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;19:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;20:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;if&lt;/span&gt;&lt;span style="color: #000000"&gt; (!lstAvailable.Items.Contains((&lt;/span&gt;&lt;span style="color: #ff0000"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt;)arlList[i]))&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;21:&lt;/font&gt;&amp;nbsp;&amp;nbsp; lstAvailable.Items.Add((&lt;/span&gt;&lt;span style="color: #ff0000"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt;)arlList[i]);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;22:&lt;/font&gt;&amp;nbsp;&amp;nbsp; lstAdded.Items.Remove((&lt;/span&gt;&lt;span style="color: #ff0000"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt;)arlList[i]);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;23:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;24:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;25:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;br&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On Click of 'Remove All' I am first adding all the items from Added Items List Box to Available Items ListBox, and then clearing all the items from the Added Items ListBox.&lt;/p&gt;
&lt;p&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; background: #808080; padding-bottom: 0px; margin-left: 4px; margin-right: 4px; padding-top: 0px"&gt;
&lt;div style="border-right: #2e595c 1px solid; border-top: #2e595c 1px solid; background: #fff; left: -2px; border-left: #2e595c 1px solid; color: black; border-bottom: #2e595c 1px solid; position: relative; top: -2px"&gt;
&lt;div style="border-right: blue 1px solid; border-top: blue 1px solid; background: #3f73b6; border-left: blue 1px solid; width: 100%; color: white; border-bottom: blue 1px solid"&gt;&lt;span style="width: 100%"&gt;Code Snippet&lt;/span&gt;&lt;/div&gt;&lt;pre&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;1:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;2:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; Moves all the items from the Added items to the Available items&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;3:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/summary&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;4:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="sender"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The source of the event.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;5:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;///&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;param name="e"&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;The &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;see cref="System.EventArgs"/&amp;gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt; instance containing the event data.&lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;/param&amp;gt;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;6:&lt;/font&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;protected&lt;/span&gt;&lt;span style="color: #000000"&gt; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;void&lt;/span&gt;&lt;span style="color: #000000"&gt; btnRemoveAll_Click(&lt;/span&gt;&lt;span style="color: #2b91af"&gt;object&lt;/span&gt;&lt;span style="color: #000000"&gt; sender, &lt;/span&gt;&lt;span style="color: #ff0000"&gt;EventArgs&lt;/span&gt;&lt;span style="color: #000000"&gt; e)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;7:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;8:&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;foreach&lt;/span&gt;&lt;span style="color: #000000"&gt; (&lt;/span&gt;&lt;span style="color: #ff0000"&gt;ListItem&lt;/span&gt;&lt;span style="color: #000000"&gt; list &lt;/span&gt;&lt;span style="color: #2b91af"&gt;in&lt;/span&gt;&lt;span style="color: #000000"&gt; lstAdded.Items)&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;9:&lt;/font&gt;&amp;nbsp;&amp;nbsp; {&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;10:&lt;/font&gt;&amp;nbsp;&amp;nbsp; lstAvailable.Items.Add(list);&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;11:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;12:&lt;/font&gt;&amp;nbsp;&amp;nbsp; lstAdded.Items.Clear();&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;&lt;font color="black"&gt;13:&lt;/font&gt;&amp;nbsp;&amp;nbsp; }&lt;/nobr&gt;&lt;br&gt;&lt;/span&gt;&lt;span style="color: #2b91af"&gt;&lt;/PRE&lt; DIV&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;In ASPX code I am adding just basic look and feel which will look like the one which is given in the screen shot at the beginning of the Post, but you can extend this control to customize the look and feel.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this Post, I have given the source code of the Control only, in my next Post I will give the sample implementation of this control, using ASP.NET and LINQ.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can download the Source Code (C#) and Help File from &lt;a href="http://weblogs.asp.net/blogs/brijmohan/SourceCode/TwoSelect.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any Comments, Suggestion or Corrections Welcome,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Brij Mohan&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6704625" width="1" height="1"&gt;</description></item><item><title>C# Coding Standards by Lance's</title><link>http://weblogs.asp.net/brijmohan/archive/2008/10/10/c-coding-standards-by-lance-s.aspx</link><pubDate>Fri, 10 Oct 2008 09:07:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6668361</guid><dc:creator>mohanbrij</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/brijmohan/rsscomments.aspx?PostID=6668361</wfw:commentRss><comments>http://weblogs.asp.net/brijmohan/archive/2008/10/10/c-coding-standards-by-lance-s.aspx#comments</comments><description>&lt;P&gt;Following the right Coding standars&amp;nbsp;comes with Practice and proper Guidance if you are a starter, and also lots of companies define or customize their own coding standards. &lt;/P&gt;
&lt;P&gt;When I came across this challange to define the coding standard for my team, I thought instead of reinventing the wheel and recollecting everything from my experience, better if I get something which is already defined and documented. So I started googling and came across a very good document which covers almost all the aspects of C# Coding standards which I was looking for. This Document covers the following topics*&lt;/P&gt;
&lt;LI&gt;Cover all major C# Language features. 
&lt;LI&gt;Provide guidelines on coding style &amp;amp; language usage (but not syntax) 
&lt;LI&gt;Demonstrate all rules in code where applicable. 
&lt;LI&gt;Describe rules in structure that is easy to read &amp;amp; use. 
&lt;LI&gt;Define clear &amp;amp; concise rules. 
&lt;LI&gt;Use consistent terminology &amp;amp; rule patterns. 
&lt;LI&gt;Only provide rules where there is a clear cut best practice. 
&lt;LI&gt;Lead developers to a "pit of success" and avoid common "pits of failure"&lt;/LI&gt;
&lt;P&gt;You can download the PDF from here &lt;A href="http://weblogs.asp.net/lhunt/attachment/591275.ashx" mce_href="http://weblogs.asp.net/lhunt/attachment/591275.ashx"&gt;http://weblogs.asp.net/lhunt/attachment/591275.ashx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Original Post you can find here : &lt;A href="http://weblogs.asp.net/lhunt/pages/CSharp-Coding-Standards-document.aspx" mce_href="http://weblogs.asp.net/lhunt/pages/CSharp-Coding-Standards-document.aspx"&gt;http://weblogs.asp.net/lhunt/pages/CSharp-Coding-Standards-document.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;
&lt;P&gt;~Brij&lt;/P&gt;
&lt;P&gt;* All the Copyrights in this&amp;nbsp;Post are the property&amp;nbsp;of the Respective Owner.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6668361" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/C_2300_+Coding+Standards/default.aspx">C# Coding Standards</category><category domain="http://weblogs.asp.net/brijmohan/archive/tags/Programming/default.aspx">Programming</category></item></channel></rss>