Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript Problem on expand images
    primarykey
    data
    text
    <p>I have a problem with my TreeView here.</p> <p>My TreeView is in a UserControl. On the first page, the UserControl is placed directly on the content page. Everything works finde.</p> <p>example (working):</p> <pre><code>&lt;a id="MainContent_CategoryTreeView1_TreeView1n209" href="javascript:TreeView_ToggleNode(MainContent_CategoryTreeView1_TreeView1_Data,209,MainContent_CategoryTreeView1_TreeView1n209,&amp;#39; &amp;#39;,MainContent_CategoryTreeView1_TreeView1n209Nodes)"&gt; &lt;img src="demo.jpg" /&gt; &lt;/a&gt; </code></pre> <p>On the second page, the UserControl is placed in a TabContainer (TabPanel). The javascript for expanding does not work.</p> <p>What i found out is, that the ID of the table cell, the expand image is placed in, differs from the href where the javascript is in.</p> <p>example (not working):</p> <pre><code>&lt;a id="MainContent_TabContainer_tbPbl_Categories_CategoryTreeView1_TreeView1n209" href="javascript:TreeView_ToggleNode(MainContent_CategoryTreeView1_TreeView1_Data,209,MainContent_CategoryTreeView1_TreeView1n209,&amp;#39; &amp;#39;,MainContent_CategoryTreeView1_TreeView1n209Nodes)"&gt; &lt;img src="demo.jpg" /&gt; &lt;/a&gt; </code></pre> <p>Is that a bug of the ASP.Net TreeView? Any idea how to solve this?</p> <p>EDIT:</p> <p>May be interesting too: Whenever the TreeView is loaded first, i build the hierarchy in code and save the rootNode to the Cache. So, my Page Load event looks like: </p> <pre><code>if (CacheFacade.CategoryTreeView == null) var rootNode = BuildHierachy(); CacheFacade.CategoryTreeView = rootNode; //databind rootNode to TreeView else //databind from CacheFacade.CategoryTreeView </code></pre> <p>This is what messes the generated javascript up. But why? The javascript has the generated client ID's in it. Isn't that part of the rendering (after the PageLoad) ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload