<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for DataBatrix</title>
	<atom:link href="http://www.databatrix.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.databatrix.com</link>
	<description>The workings of Eric Bridges</description>
	<lastBuildDate>Mon, 23 Jan 2012 14:32:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>Comment on Automatically Add RequiredFieldValidator to TextBox Controls by Eric</title>
		<link>http://www.databatrix.com/2010/11/automatically-add-requiredfieldvalidator-to-textbox-controls/comment-page-1/#comment-368</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Mon, 23 Jan 2012 14:32:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/?p=274#comment-368</guid>
		<description>A generic list would have been better and more descriptive, but to answer your question, it should be a list of type RequiredFieldValidator.  You will then see at line 38 we spin back through the list and add each newly created RequiredFieldValidator to the Page&#039;s control collection.
This would be a better type-safe declaration:
&lt;code&gt;var requiredValidators = new System.Collections.Generic.List&lt;System.Web.UI.WebControls.RequiredFieldValidator&gt;();&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>A generic list would have been better and more descriptive, but to answer your question, it should be a list of type RequiredFieldValidator.  You will then see at line 38 we spin back through the list and add each newly created RequiredFieldValidator to the Page&#8217;s control collection.<br />
This would be a better type-safe declaration:<br />
<code>var requiredValidators = new System.Collections.Generic.List&lt;System.Web.UI.WebControls.RequiredFieldValidator&gt;();</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Automatically Add RequiredFieldValidator to TextBox Controls by Fred</title>
		<link>http://www.databatrix.com/2010/11/automatically-add-requiredfieldvalidator-to-textbox-controls/comment-page-1/#comment-367</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Mon, 23 Jan 2012 11:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/?p=274#comment-367</guid>
		<description>what is the type of 
List requiredValidators = new List() ???</description>
		<content:encoded><![CDATA[<p>what is the type of<br />
List requiredValidators = new List() ???</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ceton InfiniTV 4 CableCARD Installation on Verizon FiOS by iphonefamily</title>
		<link>http://www.databatrix.com/2010/12/ceton-infinitv-4-cablecard-installation-on-verizon-fios/comment-page-1/#comment-336</link>
		<dc:creator>iphonefamily</dc:creator>
		<pubDate>Mon, 06 Jun 2011 02:32:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/?p=304#comment-336</guid>
		<description>Nice to know this tuner is coming down in prices.  I&#039;m considering adding this to my HTPC.</description>
		<content:encoded><![CDATA[<p>Nice to know this tuner is coming down in prices.  I&#8217;m considering adding this to my HTPC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ListSearchExtender not finding some numeric values by Ramesh</title>
		<link>http://www.databatrix.com/2010/11/listsearchextender-not-finding-some-numeric-values/comment-page-1/#comment-335</link>
		<dc:creator>Ramesh</dc:creator>
		<pubDate>Sat, 07 May 2011 09:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/?p=265#comment-335</guid>
		<description>Hi Eric,
I faced the same problem.
I set IsSorted = &quot;false&quot;.
Now it is working fine.

Thanks..........</description>
		<content:encoded><![CDATA[<p>Hi Eric,<br />
I faced the same problem.<br />
I set IsSorted = &#8220;false&#8221;.<br />
Now it is working fine.</p>
<p>Thanks&#8230;&#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Populate TreeView From Custom Object Using Serializer by Eric</title>
		<link>http://www.databatrix.com/2010/12/populate-treeview-from-custom-object-using-serializer/comment-page-1/#comment-332</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Thu, 03 Feb 2011 21:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/?p=321#comment-332</guid>
		<description>Hello Andre,

There are two issues that is causing the NULL properties to not show up.  The first is that by default the XmlSerializer will not serialize a null value.  You can force it to do so by decorating your property with XmlElement(IsNullalble=true) attribute:

&lt;code&gt;[System.Xml.Serialization.XmlElement(IsNullable = true)]
public string NullableValueHere { get; set; }&lt;/code&gt;

That alone won&#039;t fix your problem.  We also need to tweak the code to check for &quot;null&quot; value in the xml.  The XmlSerializer will add the attribute &quot;xsi:nil=true&quot; to the element.  So we can look for that:

&lt;code&gt;public TreeNode PopulateNode(System.Xml.XmlNode node)
    {
        TreeNode treenode = new TreeNode(node.Name);  // Add the Name to the Node
        if (node.ChildNodes.Count == 1) //Prevents ParentNode from displaying all of the InnerText
            treenode.Text += &quot;=&quot; + node.InnerText; // If only 1 ChildNode then add the InnerText

        for (int i = 0; i &lt; node.ChildNodes.Count; i++)
        {
            if (node.ChildNodes[i].HasChildNodes &#124;&#124; IsNull(node.ChildNodes[i]))
            {
                treenode.ChildNodes.Add(PopulateNode(node.ChildNodes[i]));
            }
        }
        return treenode;
    }

  public bool IsNull(System.Xml.XmlNode node)
    {
        if (node.Attributes != null)
        {
            for (int i = 0; i &lt; node.Attributes.Count; i++)
            {
                if (node.Attributes[i].Name == &quot;xsi:nil&quot;)
                {
                    return Convert.ToBoolean(node.Attributes[i].Value);
                }
            }
        }
        return false;
    }
&lt;/code&gt;
-----------------------------------
You can try that out and see if it works for you.  I didn&#039;t fully test that code...and maybe it could be written better...but I think it will do what you are needing it to do.</description>
		<content:encoded><![CDATA[<p>Hello Andre,</p>
<p>There are two issues that is causing the NULL properties to not show up.  The first is that by default the XmlSerializer will not serialize a null value.  You can force it to do so by decorating your property with XmlElement(IsNullalble=true) attribute:</p>
<p><code>[System.Xml.Serialization.XmlElement(IsNullable = true)]<br />
public string NullableValueHere { get; set; }</code></p>
<p>That alone won&#8217;t fix your problem.  We also need to tweak the code to check for &#8220;null&#8221; value in the xml.  The XmlSerializer will add the attribute &#8220;xsi:nil=true&#8221; to the element.  So we can look for that:</p>
<p><code>public TreeNode PopulateNode(System.Xml.XmlNode node)<br />
    {<br />
        TreeNode treenode = new TreeNode(node.Name);  // Add the Name to the Node<br />
        if (node.ChildNodes.Count == 1) //Prevents ParentNode from displaying all of the InnerText<br />
            treenode.Text += "=" + node.InnerText; // If only 1 ChildNode then add the InnerText</p>
<p>        for (int i = 0; i < node.ChildNodes.Count; i++)<br />
        {<br />
            if (node.ChildNodes[i].HasChildNodes || IsNull(node.ChildNodes[i]))<br />
            {<br />
                treenode.ChildNodes.Add(PopulateNode(node.ChildNodes[i]));<br />
            }<br />
        }<br />
        return treenode;<br />
    }</p>
<p>  public bool IsNull(System.Xml.XmlNode node)<br />
    {<br />
        if (node.Attributes != null)<br />
        {<br />
            for (int i = 0; i < node.Attributes.Count; i++)<br />
            {<br />
                if (node.Attributes[i].Name == "xsi:nil")<br />
                {<br />
                    return Convert.ToBoolean(node.Attributes[i].Value);<br />
                }<br />
            }<br />
        }<br />
        return false;<br />
    }<br />
</code><br />
-----------------------------------<br />
You can try that out and see if it works for you.  I didn't fully test that code...and maybe it could be written better...but I think it will do what you are needing it to do.</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Populate TreeView From Custom Object Using Serializer by Andre Brus</title>
		<link>http://www.databatrix.com/2010/12/populate-treeview-from-custom-object-using-serializer/comment-page-1/#comment-331</link>
		<dc:creator>Andre Brus</dc:creator>
		<pubDate>Wed, 02 Feb 2011 09:47:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/?p=321#comment-331</guid>
		<description>Hello Eric,
Ik saw your excellent example of &quot;Populate TreeView From Custom Object Using Serializer&quot;.
It seems to work well for my custom business objects, apart from 1 thing: when a field in my custom business objects has a value of NULL, it isn&#039;t shown AT ALL in the treeview... It is just skipped. I would have expected/liked to see it in the treeview, shown as something like (for a NULL zipcode):
Street: Abbey Road
ZipCode: n/a
Housenumber: 13
Do you have an addition for your code to make this possible?
Thanks &amp; Kind Regards, Andre Brus, Holland.</description>
		<content:encoded><![CDATA[<p>Hello Eric,<br />
Ik saw your excellent example of &#8220;Populate TreeView From Custom Object Using Serializer&#8221;.<br />
It seems to work well for my custom business objects, apart from 1 thing: when a field in my custom business objects has a value of NULL, it isn&#8217;t shown AT ALL in the treeview&#8230; It is just skipped. I would have expected/liked to see it in the treeview, shown as something like (for a NULL zipcode):<br />
Street: Abbey Road<br />
ZipCode: n/a<br />
Housenumber: 13<br />
Do you have an addition for your code to make this possible?<br />
Thanks &amp; Kind Regards, Andre Brus, Holland.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ceton InfiniTV 4 CableCARD Installation on Verizon FiOS by Eric</title>
		<link>http://www.databatrix.com/2010/12/ceton-infinitv-4-cablecard-installation-on-verizon-fios/comment-page-1/#comment-328</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sat, 15 Jan 2011 16:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/?p=304#comment-328</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-323&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-323&quot; rel=&quot;nofollow&quot;&gt;Steve&lt;/a&gt; :&lt;/strong&gt;
          &lt;p&gt;Just curious, when you called Verizon to set up the truck roll, did you tell them it was for a media center install, or just for a TiVo or something?&lt;/p&gt;
         &lt;/blockquote&gt;
I just asked for a cablecard. They didn&#039;t question what it was for.  I started the conversation stating that I knew people had problems ordering cablecards.  The guy said it was a simple request and never asked any additional questions...he just scheduled the truck roll.</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-323"><p>
<strong><a href="#comment-323" rel="nofollow">Steve</a> :</strong></p>
<p>Just curious, when you called Verizon to set up the truck roll, did you tell them it was for a media center install, or just for a TiVo or something?</p>
</blockquote>
<p>I just asked for a cablecard. They didn&#8217;t question what it was for.  I started the conversation stating that I knew people had problems ordering cablecards.  The guy said it was a simple request and never asked any additional questions&#8230;he just scheduled the truck roll.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ceton InfiniTV 4 CableCARD Installation on Verizon FiOS by Steve</title>
		<link>http://www.databatrix.com/2010/12/ceton-infinitv-4-cablecard-installation-on-verizon-fios/comment-page-1/#comment-323</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 31 Dec 2010 22:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/?p=304#comment-323</guid>
		<description>Just curious, when you called Verizon to set up the truck roll, did you tell them it was for a media center install, or just for a TiVo or something?</description>
		<content:encoded><![CDATA[<p>Just curious, when you called Verizon to set up the truck roll, did you tell them it was for a media center install, or just for a TiVo or something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Company Intranet by Eric</title>
		<link>http://www.databatrix.com/2009/08/company-intranet/comment-page-1/#comment-310</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Wed, 04 Aug 2010 01:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/2009/08/company-intranet/#comment-310</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-309&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-309&quot; rel=&quot;nofollow&quot;&gt;martin&lt;/a&gt; :&lt;/strong&gt;
          &lt;p&gt;Nice idea creating the tree from folders.&lt;/p&gt;
         &lt;/blockquote&gt;
Thanks!  I ended up  sharing out the folder to the appropriate people and never looked back.</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-309"><p>
<strong><a href="#comment-309" rel="nofollow">martin</a> :</strong></p>
<p>Nice idea creating the tree from folders.</p>
</blockquote>
<p>Thanks!  I ended up  sharing out the folder to the appropriate people and never looked back.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Company Intranet by martin</title>
		<link>http://www.databatrix.com/2009/08/company-intranet/comment-page-1/#comment-309</link>
		<dc:creator>martin</dc:creator>
		<pubDate>Thu, 01 Jul 2010 04:17:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.databatrix.com/2009/08/company-intranet/#comment-309</guid>
		<description>Nice idea creating the tree from folders.</description>
		<content:encoded><![CDATA[<p>Nice idea creating the tree from folders.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

