<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.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>Internet Explorer Web Controls</title><link>http://forums.asp.net/91.aspx</link><description>General discussion of the Internet Explorer Web Controls source package for ASP.NET 1.x.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: TreeView problems: limited AutoPostBack / LinkButton in Node / multiple trees</title><link>http://forums.asp.net/thread/2986703.aspx</link><pubDate>Fri, 06 Mar 2009 06:45:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2986703</guid><dc:creator>qwerty_key</dc:creator><author>qwerty_key</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2986703.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=2986703</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;hi&lt;/p&gt;&lt;p&gt;I could not find any attribute like &lt;b&gt;Autopostback &lt;/b&gt;for &lt;b&gt;asp.net treeview control.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;To disable Expand/Collapse to be posted back , check if its &lt;b&gt;EnableClientScript&amp;nbsp; &lt;/b&gt;attribute is set to &lt;b&gt;true&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;To add LinkButtons or other Web Controls into a TreeNode, please refer this:&lt;/p&gt;&lt;p&gt;&lt;a href="http://forums.asp.net/p/1372883/2876414.aspx" title="http://forums.asp.net/p/1372883/2876414.aspx"&gt;http://forums.asp.net/p/1372883/2876414.aspx &lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;hope this helps......&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: TreeView problems: limited AutoPostBack / LinkButton in Node / multiple trees</title><link>http://forums.asp.net/thread/504217.aspx</link><pubDate>Fri, 12 Mar 2004 03:52:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:504217</guid><dc:creator>SharepointKida</dc:creator><author>SharepointKida</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/504217.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=504217</wfw:commentRss><description>Hi!
&lt;br /&gt;

&lt;br /&gt;
I read in your post that you've added multiple treeviews in a page successfully. I am using treeview control in my Sharepoint Webparts (individual application which you can add in a page), i have created multiple webparts which uses the treeview to display different datas. I have try add multiple webparts in one page. But as soon as I add another webpart with treeview control in it. one of them stops displaying treeview!!! it's really wierd. could you please help me out in this one? what am i doing wrong? ie. how you are diming the treeivew and instanciating the control etc.. proxy settings.. etc.
&lt;br /&gt;

&lt;br /&gt;
Any help in this will be much appriciated.
&lt;br /&gt;

&lt;br /&gt;
Regards,
&lt;br /&gt;
Nilesh</description></item><item><title>Re: TreeView problems: limited AutoPostBack / LinkButton in Node / multiple trees</title><link>http://forums.asp.net/thread/399679.aspx</link><pubDate>Thu, 20 Nov 2003 17:37:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:399679</guid><dc:creator>constantlydefragging</dc:creator><author>constantlydefragging</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/399679.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=399679</wfw:commentRss><description>I have had the same problem. 
&lt;br /&gt;
I managed to find a workaround, not very elegant though. Code is in C# 
&lt;br /&gt;

&lt;br /&gt;
in .aspx 
&lt;br /&gt;
make Treeview1.AutoPostback = false 
&lt;br /&gt;

&lt;br /&gt;
add an hidden input field (tbSelectedNode), don't forget to make it RunAtServer 
&lt;br /&gt;
add a asp:Button (btnPost), I made this 1px high 1px wide so you can't see it 
&lt;br /&gt;

&lt;br /&gt;
add a javascript function in the HEAD section for the events to handle 
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; 
&lt;br /&gt;
function nodepostback() 
&lt;br /&gt;
{ 
&lt;br /&gt;
var postback = document.getElementById('btnPost'); 
&lt;br /&gt;
var hidden = document.getElementById('tbSelectedNode'); 
&lt;br /&gt;
var treeview = document.getElementById('tvMeterGroups'); 
&lt;br /&gt;
if(hidden != null &amp;amp;&amp;amp; treeview != null) 
&lt;br /&gt;
{ 
&lt;br /&gt;
if(*** enter your condition for posting here, if you want one ***) 
&lt;br /&gt;
{ 
&lt;br /&gt;
hidden.value = treeview.selectedNodeIndex; 
&lt;br /&gt;
postback .click(); 
&lt;br /&gt;
} 
&lt;br /&gt;
} 
&lt;br /&gt;
return false; 
&lt;br /&gt;
}; 
&lt;br /&gt;
&amp;lt;/script&amp;gt; 
&lt;br /&gt;

&lt;br /&gt;
in code behind .aspx.cs 
&lt;br /&gt;
add the handlers for the events you want to handle, in the Page_Load like this: 
&lt;br /&gt;
Treeview1.Attributes.Add(&amp;quot;onselectedindexchange&amp;quot;, &amp;quot;javascript:nodepostback();&amp;quot;); 
&lt;br /&gt;

&lt;br /&gt;
add a page private static string variable: 
&lt;br /&gt;
private static string strSelectedNode = &amp;quot;&amp;quot;; 
&lt;br /&gt;

&lt;br /&gt;
add a click handler for the button 
&lt;br /&gt;
private void btnPost_Click(object sender, System.EventArgs e) 
&lt;br /&gt;
{ 
&lt;br /&gt;
strSelectedNode = tbSelectedNode.Value; 
&lt;br /&gt;
.... 
&lt;br /&gt;
.... 
&lt;br /&gt;
} 
&lt;br /&gt;

&lt;br /&gt;
add PreRender for the treeview, to ensure the selection gets made 
&lt;br /&gt;
private void Treeview1_PreRender(object sender, System.EventArgs e) 
&lt;br /&gt;
{ 
&lt;br /&gt;
Treeview1.SelectedNodeIndex = strSelectedNode; 
&lt;br /&gt;
} 
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
The above worked for me when all I wanted was 'onselectedindexchange' postback. 
&lt;br /&gt;

&lt;br /&gt;
I tried 'return false' handlers for the other events, when I had AutoPoasback=true, but that caused the control to lose collapsed/expanded info. 
&lt;br /&gt;
I tried to remove attributes for the events I didn't want posted back in PreRender but that didn't remove them when I viewed source. 
&lt;br /&gt;
This was all I could get to work. 
&lt;br /&gt;

&lt;br /&gt;
I hope this may help others who have similar problems. 
&lt;br /&gt;</description></item><item><title>TreeView problems: limited AutoPostBack / LinkButton in Node / multiple trees</title><link>http://forums.asp.net/thread/302466.aspx</link><pubDate>Thu, 07 Aug 2003 11:51:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:302466</guid><dc:creator>anon2anon</dc:creator><author>anon2anon</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/302466.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=91&amp;PostID=302466</wfw:commentRss><description>hi folks, 
&lt;br /&gt;

&lt;br /&gt;
I have some problems regarding the TreeView control.
&lt;br /&gt;

&lt;br /&gt;
1. When AutoPostBack is set to true, all events (Expand/Collapse/SelectedIndexChange) cause a postback. But I only want the event SelectedIndexChange to be posted back, because Expand and Collapse needn't be handled on server. What should I do to disable Expand/Collapse to be posted back?
&lt;br /&gt;

&lt;br /&gt;
2. Can I add LinkButtons or other Web Controls into a TreeNode? When the user select a TreeNode, I want a command to be issued, NOT a url to be opened. To do this, I tried to embed LinkButtons to TreeNodes but TreeNode isn't inherited from System.Web.UI.Control so I can't write code like this:
&lt;br /&gt;

&lt;br /&gt;
LinkButton button = new LinkButton();
&lt;br /&gt;
... (configure the button)
&lt;br /&gt;
TreeNode node = new TreeNode();
&lt;br /&gt;
node.Controls.Add(button);
&lt;br /&gt;

&lt;br /&gt;
I think that if TreeNode inherits System.Web.UI.Control, it would be much more elegant than the current implementation.
&lt;br /&gt;

&lt;br /&gt;
3. there are multiple dynamically created TreeViews on a single page. When users select a TreeNode in one of these TreeViews, the event SelectedIndexChange only contains the index of new/old nodes, how could I know which TreeView the selected TreeNode belongs to?
&lt;br /&gt;
If the event SelectedIndexChange also contains the ID of the selected TreeNode (but it doesn't), the problem can be solved easily.
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
btw: I had requested these new features in another post
&lt;br /&gt;
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&amp;amp;PostID=300392</description></item></channel></rss>