<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>sanjeevh</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sanjeevh/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sanjeevh/feed.xml</link>
    <description>A dev scratchpad.</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:50:25 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Windows Mojave</title>
      <link>https://docs.microsoft.com/archive/blogs/sanjeevh/windows-mojave</link>
      <pubDate>Wed, 30 Jul 2008 06:08:00 GMT</pubDate>
      <dc:creator><![CDATA[sanjeevh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sanjeevh/2008/07/30/windows-mojave/</guid>
      <description><![CDATA[Catch it here : https://www.mojaveexperiment.com/]]></description>
      <content:encoded><![CDATA[Catch it here : <a href="https://www.mojaveexperiment.com/" title="https://www.mojaveexperiment.com/" mce_href="https://www.mojaveexperiment.com/">https://www.mojaveexperiment.com/</a><br>]]></content:encoded>
    </item>
    <item>
      <title>DataGridView, Sorting and Paging - using DataView</title>
      <link>https://docs.microsoft.com/archive/blogs/sanjeevh/datagridview-sorting-and-paging-using-dataview</link>
      <pubDate>Wed, 14 May 2008 09:10:00 GMT</pubDate>
      <dc:creator><![CDATA[sanjeevh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sanjeevh/2008/05/14/datagridview-sorting-and-paging-using-dataview/</guid>
      <description><![CDATA[I&nbsp;needed ability to sort as well as pagination in a data grid view for an application. There...]]></description>
      <content:encoded><![CDATA[<FONT size=2>
<P>I&nbsp;needed ability to sort as well as pagination in a data grid view for an application. There are many approaches of implementing it but we had data in memory, prefetched. I used a dataview to create sorted, then paged based on counters generated manually. Here is the code for the same, but somehow I am not satisfied with the approach as its slow on large data sets. Any ideas how to do it faster?</P><FONT size=2>
<P></FONT><FONT color=#008000 size=2>//Form Load add a column, which is used keeping the sorted order, and then paging.</P></FONT><FONT size=2>
<P></FONT><FONT color=#008000 size=2>//Add an event handler to the DatagridView Sorted event</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> PageDemoForm_Load(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</P>
<P>{</P>
<P>productsDataTable.Columns.Add(</FONT><FONT color=#a31515 size=2>"RecordIndex"</FONT><FONT size=2>, </FONT><FONT color=#0000ff size=2>typeof</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>));</P>
<P>pageNumberTextBox.Text = currentPage.ToString();</P>
<P>dataGridViewControl.Sorted += </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>EventHandler</FONT><FONT size=2>(dataControl_Sorted);</P>
<P>SetView(currentPage);</P>
<P>}</P>
<P></FONT><FONT color=#008000 size=2>//Datagridview Sorted Event handler</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> dataControl_Sorted(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</P>
<P>{</P>
<P>SetView(currentPage);</P>
<P>}</P>
<P></FONT><FONT color=#008000 size=2>//Sort the View, refresh record indexes, then filter the view on the indexes which fall between lowbound &amp; highBound</P></FONT><FONT size=2>
<P></FONT><FONT color=#008000 size=2>//here pageSize is a class level constant which can be configured as needed.</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> SetView(</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> pageNumber)</P>
<P>{</P>
<P></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> lowBound = pageSize * (pageNumber - 1);</P>
<P></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> highBound = pageSize * pageNumber;</P>
<P></FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> sortExpression = (dataGridViewControl.SortedColumn == </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2>) ? </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>.Empty : dataGridViewControl.SortedColumn.DataPropertyName + </FONT><FONT color=#a31515 size=2>" "</FONT><FONT size=2> + ((dataGridViewControl.SortOrder == System.Windows.Forms.</FONT><FONT color=#2b91af size=2>SortOrder</FONT><FONT size=2>.Ascending) ? </FONT><FONT color=#a31515 size=2>"ASC"</FONT><FONT size=2> : </FONT><FONT color=#a31515 size=2>"DESC"</FONT><FONT size=2>);</P>
<P></FONT><FONT color=#008000 size=2>//Created a sorted view</P></FONT><FONT size=2>
<P></FONT><FONT color=#2b91af size=2>DataView</FONT><FONT size=2> pagedView = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>DataView</FONT><FONT size=2>(productsDataTable, </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>.Empty, sortExpression, </FONT><FONT color=#2b91af size=2>DataViewRowState</FONT><FONT size=2>.CurrentRows);</P>
<P></FONT><FONT color=#008000 size=2>//generate row indexes, this is a hidden column in grid.</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>for</FONT><FONT size=2> (</FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> i = 0; i &lt; pagedView.Count; i++)</P>
<P>{</P>
<P>pagedView[i][</FONT><FONT color=#a31515 size=2>"RecordIndex"</FONT><FONT size=2>] = i + 1;</P>
<P>}</P>
<P></FONT><FONT color=#008000 size=2>//set RowFilter to get desired page records.</P></FONT><FONT size=2>
<P>pagedView.RowFilter = </FONT><FONT color=#a31515 size=2>"RecordIndex &gt; "</FONT><FONT size=2> + lowBound + </FONT><FONT color=#a31515 size=2>" AND "</FONT><FONT size=2> + highBound + </FONT><FONT color=#a31515 size=2>" &gt;= RecordIndex"</FONT><FONT size=2>;</P>
<P></FONT><FONT color=#008000 size=2>//hid the RecordIndex column from grid</P></FONT><FONT size=2>
<P></FONT><FONT color=#2b91af size=2>DataGridViewTextBoxColumn</FONT><FONT size=2> invisibleColumn = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>DataGridViewTextBoxColumn</FONT><FONT size=2>();</P>
<P>invisibleColumn.Visible = </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>;</P>
<P>invisibleColumn.DataPropertyName = </FONT><FONT color=#a31515 size=2>"RecordIndex"</FONT><FONT size=2>;</P>
<P></FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.dataGridViewControl.Columns.Add(invisibleColumn);</P>
<P></FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.dataGridViewControl.DataSource = pagedView;</P>
<P>}</P>
<P></FONT><FONT color=#008000 size=2>//Click event for next page button</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> NextPage(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</P>
<P>{</P>
<P>currentPage = </FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>.Parse(pageNumberTextBox.Text) + 1;</P>
<P>pageNumberTextBox.Text = currentPage.ToString();</P>
<P>SetView(currentPage);</P>
<P>}</P>
<P></FONT><FONT color=#008000 size=2>//Click event for previous page button</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> PreviousPage(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</P>
<P>{</P>
<P>currentPage = </FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2>.Parse(pageNumberTextBox.Text) - 1;</P>
<P>pageNumberTextBox.Text = currentPage.ToString();</P>
<P>SetView(currentPage);</P>
<P>}</P>
<P></FONT><FONT color=#008000 size=2>//Click event for last page button</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> LastPage(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</P>
<P>{</P>
<P>currentPage = </FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.productsDataTable.Rows.Count / pageSize;</P>
<P></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> residue = </FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.productsDataTable.Rows.Count % pageSize;</P>
<P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (residue &gt; 0)</P>
<P>{</P>
<P>currentPage++;</P>
<P>}</P>
<P>pageNumberTextBox.Text = currentPage.ToString();</P>
<P>SetView(currentPage);</P>
<P>}</P>
<P></FONT><FONT color=#008000 size=2>//Click event for first page button</P></FONT><FONT size=2>
<P></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> FirstPage(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</P>
<P>{</P>
<P>currentPage = 1;</P>
<P>pageNumberTextBox.Text = currentPage.ToString();</P>
<P>SetView(currentPage);</P>
<P>}</P></FONT></FONT><FONT size=2></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Logo design - look at your logos from different angles. An exmaple.</title>
      <link>https://docs.microsoft.com/archive/blogs/sanjeevh/logo-design-look-at-your-logos-from-different-angles-an-exmaple</link>
      <pubDate>Tue, 29 Apr 2008 06:56:00 GMT</pubDate>
      <dc:creator><![CDATA[sanjeevh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sanjeevh/2008/04/29/logo-design-look-at-your-logos-from-different-angles-an-exmaple/</guid>
      <description><![CDATA[https://www.telegraph.co.uk/news/main.jhtml?xml=/news/2008/04/24/nogc124.xml&amp;reason=0
&nbsp;This...]]></description>
      <content:encoded><![CDATA[<P><A href="https://www.telegraph.co.uk/news/main.jhtml?xml=/news/2008/04/24/nogc124.xml&amp;reason=0">https://www.telegraph.co.uk/news/main.jhtml?xml=/news/2008/04/24/nogc124.xml&amp;reason=0</A></P>
<P>&nbsp;This is one of the funny logo designed, unintentional though.</P>]]></content:encoded>
    </item>
    <item>
      <title>Row specific filtering of DataGridViewComboBox data source.</title>
      <link>https://docs.microsoft.com/archive/blogs/sanjeevh/row-specific-filtering-of-datagridviewcombobox-data-source</link>
      <pubDate>Sun, 13 Apr 2008 15:32:00 GMT</pubDate>
      <dc:creator><![CDATA[sanjeevh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sanjeevh/2008/04/13/row-specific-filtering-of-datagridviewcombobox-data-source/</guid>
      <description><![CDATA[I had a specific situation where I need to bind a combo box's data source in a grid view had to be...]]></description>
      <content:encoded><![CDATA[<p>I had a specific situation where I need to bind a combo box's data source in a grid view had to be filtered based on a value in the row. Here is how I have done the same. I have not assigned any datasource to DataGridViewComboBox column, instead I have assigned DataSource to each of the DataGridViewComboBoxCell. Hope this is right. :)<br></p><p>&nbsp;</p><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">public</span> <span style="color: blue;">partial</span> <span style="color: blue;">class</span> <span style="color: rgb(43, 145, 175);">DemoGridView</span> : <span style="color: rgb(43, 145, 175);">Form<o:p></o:p></span></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span>
<span style="color: blue;">string</span>[] names = <span style="color: blue;">new</span>
<span style="color: blue;">string</span>[] { <span style="color: rgb(163, 21, 21);">"ABC"</span>,
<span style="color: rgb(163, 21, 21);">"XYZ"</span>, <span style="color: rgb(163, 21, 21);">"UVW"</span>
};<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">public</span>
DemoGridView()<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>InitializeComponent();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span>
<span style="color: blue;">void</span> Form1_Load(<span style="color: blue;">object</span>
sender, <span style="color: rgb(43, 145, 175);">EventArgs</span> e)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataSet</span>
data = BuildDemoData();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>AddColumns(data);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>dataGridView1.DataSource =
data.Tables[<span style="color: rgb(163, 21, 21);">"DemoData"</span>];<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SetFilteredList(data,
dataGridView1);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span>
<span style="color: blue;">void</span> SetFilteredList(<span style="color: rgb(43, 145, 175);">DataSet</span>
data, <span style="color: rgb(43, 145, 175);">DataGridView</span> demoGrid)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataViewManager</span>
viewManager = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataViewManager</span>(data);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoGrid.AllowUserToAddRows = <span style="color: blue;">false</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoGrid.AllowUserToDeleteRows = <span style="color: blue;">false</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">for</span>
(<span style="color: blue;">int</span> i = 0; i &lt; demoGrid.Rows.Count; i++)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataGridViewComboBoxCell</span>
comboCell = demoGrid[3, i] <span style="color: blue;">as</span> <span style="color: rgb(43, 145, 175);">DataGridViewComboBoxCell</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataView</span>
cellView = viewManager.CreateDataView(data.Tables[<span style="color: rgb(163, 21, 21);">"Mod3Numbers"</span>]);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;</span>cellView.RowFilter = <span style="color: rgb(163, 21, 21);">"FilterID = "</span> + demoGrid[0,
i].Value.ToString();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>comboCell.DataSource =
cellView;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span>
<span style="color: blue;">void</span> AddColumns(<span style="color: rgb(43, 145, 175);">DataSet</span>
data)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataGridViewTextBoxColumn</span>
idCol = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataGridViewTextBoxColumn</span>();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>idCol.HeaderText = <span style="color: rgb(163, 21, 21);">"ID"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>idCol.DataPropertyName = <span style="color: rgb(163, 21, 21);">"ID"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>idCol.Visible = <span style="color: blue;">false</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataGridViewTextBoxColumn</span>
nameCol = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataGridViewTextBoxColumn</span>();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>nameCol.HeaderText = <span style="color: rgb(163, 21, 21);">"Name"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>nameCol.DataPropertyName = <span style="color: rgb(163, 21, 21);">"Name"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataGridViewComboBoxColumn</span>
monthCol = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataGridViewComboBoxColumn</span>();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>monthCol.DataSource = data.Tables[<span style="color: rgb(163, 21, 21);">"Months"</span>];<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>monthCol.DisplayMember = <span style="color: rgb(163, 21, 21);">"Name"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>monthCol.ValueMember = <span style="color: rgb(163, 21, 21);">"ID"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>monthCol.DataPropertyName = <span style="color: rgb(163, 21, 21);">"Month"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataGridViewComboBoxColumn</span>
fidCol = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataGridViewComboBoxColumn</span>();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: green;">//FIDCol.DataSource
= data.Tables["Mod3Numbers"].DefaultView;<o:p></o:p></span></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>fidCol.DisplayMember = <span style="color: rgb(163, 21, 21);">"Name"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>fidCol.ValueMember = <span style="color: rgb(163, 21, 21);">"ID"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>fidCol.DataPropertyName = <span style="color: rgb(163, 21, 21);">"FID"</span>;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>dataGridView1.Columns.Add(idCol);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>dataGridView1.Columns.Add(nameCol);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>dataGridView1.Columns.Add(monthCol);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>dataGridView1.Columns.Add(fidCol);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span>
<span style="color: rgb(43, 145, 175);">DataSet</span> BuildDemoData()<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataSet</span>
data = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataSet</span>();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>data.Tables.Add(GenerateListOfMonths());<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>data.Tables.Add(GetListMod3());<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>data.Tables.Add(GetMainList());<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">return</span>
data;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span>
<span style="color: rgb(43, 145, 175);">DataTable</span> GetMainList()<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataTable</span>
demoTable = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataTable</span>(<span style="color: rgb(163, 21, 21);">"DemoData"</span>);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoTable.Columns.Add(<span style="color: rgb(163, 21, 21);">"ID"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">int</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoTable.Columns.Add(<span style="color: rgb(163, 21, 21);">"Name"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">string</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoTable.Columns.Add(<span style="color: rgb(163, 21, 21);">"Month"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">int</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoTable.Columns.Add(<span style="color: rgb(163, 21, 21);">"FID"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">int</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">Random</span>
rand = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">Random</span>(<span style="color: rgb(43, 145, 175);">DateTime</span>.Now.Millisecond % 100);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataRow</span>
demoRow;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">for</span>
(<span style="color: blue;">int</span> i = 0; i &lt; 3; i++)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoRow = demoTable.NewRow();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoRow[0] = i;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoRow[1] = names[i];<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoRow[2] = rand.Next(1,12);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoRow[3] = 3*rand.Next(1,6) +
i;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>demoTable.Rows.Add(demoRow);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">return</span>
demoTable;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span>
<span style="color: rgb(43, 145, 175);">DataTable</span> GetListMod3()<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataTable</span>
mod3Table = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataTable</span>(<span style="color: rgb(163, 21, 21);">"Mod3Numbers"</span>);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mod3Table.Columns.Add(<span style="color: rgb(163, 21, 21);">"Name"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">string</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mod3Table.Columns.Add(<span style="color: rgb(163, 21, 21);">"ID"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">int</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mod3Table.Columns.Add(<span style="color: rgb(163, 21, 21);">"FilterID"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">int</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataRow</span>
mod3Number;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">for</span>
(<span style="color: blue;">int</span> i = 1; i &lt;= 20; i++)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mod3Number =
mod3Table.NewRow();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mod3Number[0] = i.ToString();;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mod3Number[1] = i;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mod3Number[2] = i % 3;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mod3Table.Rows.Add(mod3Number);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp; </span><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">return</span>
mod3Table;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">private</span>
<span style="color: rgb(43, 145, 175);">DataTable</span> GenerateListOfMonths()<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataTable</span>
monthsTable = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DataTable</span>(<span style="color: rgb(163, 21, 21);">"Months"</span>);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>monthsTable.Columns.Add(<span style="color: rgb(163, 21, 21);">"Name"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">string</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>monthsTable.Columns.Add(<span style="color: rgb(163, 21, 21);">"ID"</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">int</span>));<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">DataRow</span>
month;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">for</span>
(<span style="color: blue;">int</span> i = 1; i &lt;= 12; i++)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>month = monthsTable.NewRow();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>month[0] = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">DateTime</span>(2000,
i, i).ToString(<span style="color: rgb(163, 21, 21);">"MMMM"</span>);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>month[1] = i;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>monthsTable.Rows.Add(month);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">return</span>
monthsTable;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>}</span></p>

]]></content:encoded>
    </item>
  </channel>
</rss>