<?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 on: KryptonTreeView Nodes</title>
	<atom:link href="http://www.componentfactory.com/blog/2011/05/kryptontreeview-nodes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.componentfactory.com/blog/2011/05/kryptontreeview-nodes/</link>
	<description>Windows Forms Controls for .NET Smart Client Applications</description>
	<lastBuildDate>Sun, 05 May 2013 14:09:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Pradeep</title>
		<link>http://www.componentfactory.com/blog/2011/05/kryptontreeview-nodes/comment-page-1/#comment-3287</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Wed, 01 Jun 2011 05:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.componentfactory.com/blog/?p=704#comment-3287</guid>
		<description><![CDATA[Please Implement Datasource to be filled like the below:

public static void SetDataSource(this TreeView tvw, string RootName, Object DataSource, string ValueMember, string DisplayMember, object NodeToSelect = null, Control[] ControlsToClear = null)
{
tvw.BeginUpdate();
tvw.ClearDataSource(ControlsToClear);

TreeNode root = new TreeNode(RootName) { Name = “Root” };
tvw.Nodes.Add(root);

CurrencyManager currencyManager = (CurrencyManager)tvw.BindingContext[DataSource];
if (currencyManager.Count &gt; 0)
{
IList innerList = currencyManager.List;

PropertyDescriptor pdDisplay = currencyManager.GetItemProperties()[DisplayMember];
if (pdDisplay == null) { MsgBox.Error(“Invalid Display Member: ” + DisplayMember, “Unable to set Datasource”); return; }

PropertyDescriptor pdValue = currencyManager.GetItemProperties()[ValueMember];
if (pdDisplay == null) { MsgBox.Error(“Invalid Value Member: ” + ValueMember, “Unable to set Datasource”); return; }

foreach (object record in innerList)
{
string Text = pdDisplay.GetValue(record).ReturnEmptyIfNull();
string Value = pdValue.GetValue(record).ReturnEmptyIfNull();

TreeNode childNode = new TreeNode(Text) { Name = tvw.setName(Value), Tag = record };
root.Nodes.Add(childNode);
}
}
tvw.EndUpdate();
tvw.Format();

if (NodeToSelect != null) { tvw.SelectNode(NodeToSelect.ToString()); tvw.Focus(); }

}]]></description>
		<content:encoded><![CDATA[<p>Please Implement Datasource to be filled like the below:</p>
<p>public static void SetDataSource(this TreeView tvw, string RootName, Object DataSource, string ValueMember, string DisplayMember, object NodeToSelect = null, Control[] ControlsToClear = null)<br />
{<br />
tvw.BeginUpdate();<br />
tvw.ClearDataSource(ControlsToClear);</p>
<p>TreeNode root = new TreeNode(RootName) { Name = “Root” };<br />
tvw.Nodes.Add(root);</p>
<p>CurrencyManager currencyManager = (CurrencyManager)tvw.BindingContext[DataSource];<br />
if (currencyManager.Count &gt; 0)<br />
{<br />
IList innerList = currencyManager.List;</p>
<p>PropertyDescriptor pdDisplay = currencyManager.GetItemProperties()[DisplayMember];<br />
if (pdDisplay == null) { MsgBox.Error(“Invalid Display Member: ” + DisplayMember, “Unable to set Datasource”); return; }</p>
<p>PropertyDescriptor pdValue = currencyManager.GetItemProperties()[ValueMember];<br />
if (pdDisplay == null) { MsgBox.Error(“Invalid Value Member: ” + ValueMember, “Unable to set Datasource”); return; }</p>
<p>foreach (object record in innerList)<br />
{<br />
string Text = pdDisplay.GetValue(record).ReturnEmptyIfNull();<br />
string Value = pdValue.GetValue(record).ReturnEmptyIfNull();</p>
<p>TreeNode childNode = new TreeNode(Text) { Name = tvw.setName(Value), Tag = record };<br />
root.Nodes.Add(childNode);<br />
}<br />
}<br />
tvw.EndUpdate();<br />
tvw.Format();</p>
<p>if (NodeToSelect != null) { tvw.SelectNode(NodeToSelect.ToString()); tvw.Focus(); }</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cocotteseb</title>
		<link>http://www.componentfactory.com/blog/2011/05/kryptontreeview-nodes/comment-page-1/#comment-3284</link>
		<dc:creator>Cocotteseb</dc:creator>
		<pubDate>Tue, 31 May 2011 18:01:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.componentfactory.com/blog/?p=704#comment-3284</guid>
		<description><![CDATA[Looks really nice indeed !
KryptonTreeNode  seems to be perfect :)

Still one question :
1) Is this still possible with the KryptonTreeview ?
TreeViewChannels.BackColor = KryptonManagerMain.GlobalPalette.GetBackColor1(PaletteBackStyle.PanelAlternate, PaletteState.Normal)
        TreeViewChannels.ForeColor = KryptonManagerMain.GlobalPalette.GetContentShortTextColor1(PaletteContentStyle.LabelNormalPanel, PaletteState.Normal)

@Tom : it would be great, with the colored background it would allow us to have  the treeview we can see in office 2010. So +1 for the possibility.]]></description>
		<content:encoded><![CDATA[<p>Looks really nice indeed !<br />
KryptonTreeNode  seems to be perfect :)</p>
<p>Still one question :<br />
1) Is this still possible with the KryptonTreeview ?<br />
TreeViewChannels.BackColor = KryptonManagerMain.GlobalPalette.GetBackColor1(PaletteBackStyle.PanelAlternate, PaletteState.Normal)<br />
        TreeViewChannels.ForeColor = KryptonManagerMain.GlobalPalette.GetContentShortTextColor1(PaletteContentStyle.LabelNormalPanel, PaletteState.Normal)</p>
<p>@Tom : it would be great, with the colored background it would allow us to have  the treeview we can see in office 2010. So +1 for the possibility.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.componentfactory.com/blog/2011/05/kryptontreeview-nodes/comment-page-1/#comment-3283</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 31 May 2011 06:46:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.componentfactory.com/blog/?p=704#comment-3283</guid>
		<description><![CDATA[Good to see new development is going on!

Feature requests are not possible, but here a customdrawn request: The posibility to draw the background over the full width, to mimic the outlook treeview?!]]></description>
		<content:encoded><![CDATA[<p>Good to see new development is going on!</p>
<p>Feature requests are not possible, but here a customdrawn request: The posibility to draw the background over the full width, to mimic the outlook treeview?!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
