CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 9/1/2007 3:26:27 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 20 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
camtu
Asp.Net User
Treeview Control???9/1/2007 3:26:27 AM

0/0

I use a TreeView Control in web form,

How to: When i check parent node, childnodes of it will be checked.

Please help me!

 Regards!

Camtu



 

Amanda Wang - M
Asp.Net User
Re: Treeview Control???9/4/2007 3:46:52 AM

0/0

Hi Camtu,

camtu:

How to: When i check parent node, childnodes of it will be checked. 

You can use javascript to implement it.Below is a sample:

 <asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ShowCheckBoxes="All" ShowLines="True" onclick="client_OnTreeNodeChecked();" >
        </asp:TreeView>
  
<script language=javascript type="text/javascript">    
function client_OnTreeNodeChecked()
{
 var obj = window.event.srcElement;
 var treeNodeFound = false;
 var checkedState;
 if (obj.tagName == "INPUT" && obj.type == "checkbox") 
 {
  var treeNode = obj;
  checkedState = treeNode.checked;
  do
  {
   obj = obj.parentElement;
  } while (obj.tagName != "TABLE")
  var parentTreeLevel = obj.rows[0].cells.length;
  var parentTreeNode = obj.rows[0].cells[0];
  var tables = obj.parentElement.getElementsByTagName("TABLE");
  var numTables = tables.length
  if (numTables >= 1)
{
for (i=0; i < numTables; i++)
{
if (tables[i] == obj)
{
treeNodeFound = true;
i++;
if (i == numTables)
{
return;
}
}
if (treeNodeFound == true)
{
var childTreeLevel = tables[i].rows[0].cells.length;
if (childTreeLevel > parentTreeLevel)
{
var cell = tables[i].rows[0].cells[childTreeLevel - 1];
var inputs = cell.getElementsByTagName("INPUT");
inputs[0].checked = checkedState;
}
else
{
return;
}
}
}
}
}
}

</script>
 Hope it helps
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Programming C#: Jesse Liberty Authors: Jesse Liberty, Pages: 689, Published: 2003
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Visual Basic .NET Database Programming: database programming Authors: Rod Stephens, Pages: 405, Published: 2002
Visual Basic.Net by Example Authors: Gabriel Oancea, Robert P. Donald, Pages: 976, Published: 2002
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Access 2007 VBA Programmer's Reference Authors: Teresa Hennig, Robert G. Cooper, Rob Cooper, Geoffrey L. Griffith, Armen Stein, Pages: 1110, Published: 2007

Web:
TreeView Control (Windows Forms) The Windows Forms TreeView control displays a hierarchy of nodes, like the way files and folders are displayed in the left pane of the Windows Explorer ...
15 Seconds : Populating the TreeView Control from a Database Populating the TreeView Web Control from a database allows menu and input trees to change on the fly. Don Schlichting provides an introduction to the ...
15 Seconds : The ASP.NET 2.0 TreeView Control Thiru Thangarathinam introduces ASP.NET 2.0's new TreeView control which provides a seamless way to consume and display information from hierarchical data ...
CodeGuru: Treeview Control Learn about an advanced control based on a standard tree view control. This control supports multiple selection mode and some visual enhancement compared to ...
Michael Sync » Silverlight Toolkit - Using Silverlight TreeView ... Oct 28, 2008 ... The TreeView control provides a way to display information in a hierarchical ... As TreeView control is not Silverlight Core Library, ...
ASP.NET.4GuysFromRolla.com: Using the TreeView Control and a ... Aug 30, 2006 ... This article, by Scott Mitchell, looks at how to use the ASP.NET 2.0 TreeView control and DataList to create a simple and easily ...
vbAccelerator - vbAccelerator TreeView Control This article provides a new TreeView control that provides an alternative to the standard version provided with VB. Enhancements include much wider support ...
Visual Basic Controls in a Nutshell: Chapter 5, Controls, TreeView ... An example of a TreeView control used in an application is the Windows ... Tip: The TreeView control is contained in the Windows Common Controls (COMCTL32. ...
Ajax TreeView Sample This is an example of our Ajax TreeView Control. The Gaia Ajax TreeView Control ... As you can see, this is not the case for our Gaia Ajax TreeView Control ...
CodeProject: Hierarchical TreeView control with data binding ... The control extends standard TreeView control to make it fully data bind.; Author: Mike Chaliy; Section: Tree Controls; Chapter: Desktop Development.

Videos:
One Note Tree View Control Control to navigate the notebooks in treeView
Visual Basic IV : TreeView Control - Shalvin Visual Basic IV : TreeView Control (Without Voice) - Shalvin
Using TreeView Control VB2008 and VB2005 http://www.vb-heaven.com
Customized rad treeview control with checkboxes Handling a role permission matrix using telerik rad treeview control with customized checkboxes table
Tree View Learn how the TreeView control has been improved and its programming model simplified, allowing you to easily read and manipulate hierarchical data s...
How to customize Outlook toolbar How to add any custom .NET controls to Microsoft Outlook toolbar, such as button, grid, tree view, label, image, user control etc. For more informati...
GCCS97 #146 Proceedings of the GCC Developers Summit 2007 From http://ols.108.redhat.com/2007/GCC-Reprints/GCC2007-Proceedings.pdf . leaving many node attributes out. Figure 2: Syntax of paramet...
Windows XP and VISTA Secrets.(Make Your Computer Faster) In Windows XP everytime you open My Computer to browse folders XP automatically searches for network files and printers. This causes a delay in displ...
GCCS97 #145 Proceedings of the GCC Developers Summit 2007 From http://ols.108.redhat.com/2007/GCC-Reprints/GCC2007-Proceedings.pdf . compatibility, which allowed us to concentrate on the deve...
Structuring Personal Information When Everything Can Be Saved and Searched... Google TechTalks May 17, 2006 William Jones William Jones is an Research Associate Professor in The Information School at the University of Washingt...




Search This Site:










automatic updates of sql database

design mode scrollbar is missing

event bubbling

need template converted to skin.

adding user control to run time created table

how to simulate treeview checkbox as radio button?

login then go to a term & conditions page

can we use sql server 2000 for asp.net profiles and security etc ?

poll results

issue with create user control

cannot install personal websote starter kit

window.open

error message when using cookies

y we use new keyword?

access to columnname in a typed dataset

webreference settings

app.config/web.cong

yaf and solpart

vs2005 code behind

web part

logout problem

receiving messages (msmq)

web.config problems

need help with remote dnn installation. (webhost4life.com)

membership: what to store in user tables?

keep getting errors when uploading modules. 3.1.1

reading .txt files

how to add langid query string parametar in address for each page?

error handling?

changing themes programatically from master page

 
All Times Are GMT