CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.internet_explorer_web_controls Tags:
Item Type: NewsGroup Date Entered: 4/19/2004 11:25:28 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 35 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
yogrraps
Asp.Net User
IE Treeview - Checking & Unchecking All Subnodes4/19/2004 11:25:28 PM

0

Hello...

I've created a treeview that looks something like:

Root
.....Folder1
.........Subfolder1A
.............File
.............File
.........Subfolder1B
.............File
.....Folder2
.........Subfolder2A
.............File
.........Subfolder2B
.............File
.............File

Each of the folders and files have the checkbox property turned on, so that everything but the root node has a checkbox. Now I need help with code the checks or uncheck all subfolders and files when a parent checkbox is checked or unchecked. Make sense?

So, for example, if the user checks Folder1's checkbox on, then all Folder1's subfolders and files need to have there checkboxes checked on.

I've been banging my head on this one and haven't figured anything out yet. Any help would be appreciated.
soaregj
Asp.Net User
Re: IE Treeview - Checking & Unchecking All Subnodes5/20/2004 4:56:52 PM

0


Try this approach:

1. Put the code bellow in the Page_Load event:

If Not IsPostBack Then
id_Treeview.Attributes.Add("oncheck", "javascript: fMarcarNo(this.clickedNodeIndex)")
End If

2. Put the code bellow in the Page_Init event:

Dim strCodigo As String
strCodigo = "<script language='javascript'>" & vbCrLf
strCodigo &= "var nodeIndexOld;" & vbCrLf
strCodigo &= "function fMarcarNo(nodeIndex)" & vbCrLf
strCodigo &= "{" & vbCrLf
strCodigo &= " if (nodeIndexOld != null) {" & vbCrLf
strCodigo &= " if (nodeIndexOld != nodeIndex) {" & vbCrLf
strCodigo &= " var oNodeOld = id_Treeview.getTreeNode(nodeIndexOld);" & vbCrLf
strCodigo &= " oNodeOld.setAttribute('checked', 'false');" & vbCrLf
strCodigo &= " }" & vbCrLf
strCodigo &= " }" & vbCrLf
strCodigo &= " nodeIndexOld = nodeIndex;" & vbCrLf
strCodigo &= "}" & vbCrLf
strCodigo &= "</script>"
Page.RegisterClientScriptBlock("Scripts", strCodigo)


In this code the user can selects only one node.

Regards,


Guilherme Soares
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Mastering Visual Basic .NET Authors: Evangelos Petroutsos, Pages: 1153, Published: 2002
Visual Basic .NET Programming Black Book + With CD 2003 Edition Authors: Steven Holzner, Pages: 1272, Published: 2005
Dynamics AX: a guide to Microsoft Axapta Authors: Luis X. B. Mourão, David Weiner, Pages: 469, Published: 2005
Visual Basic.NET black book Authors: Steven Holzner, Pages: 1144, Published: 2002
Debugging applications Authors: John Robbins, Pages: 466, Published: 2000

Web:
IE Treeview - Checking & Unchecking All Subnodes Talk about IE Treeview - Checking & Unchecking All Subnodes.
IE Treeview - Checking & Unchecking All Subnodes - ASP.NET Forums IE Treeview - Checking & Unchecking All Subnodes. Last post 05-20-2004 12:59 PM by soaregj. 1 replies. Sort Posts: ...
ASP.NET 2.0 Treeview Checkboxes - Check All - Javascript - ASP.NET ... //get all the TreeNodes inside the TreeView (the parent
) ... //checking for any node is checked or unchecked during operation ..... This routine should work fine on IE and I haven't tested on any other browsers. ...
.NET Windows Forms controls treeview checkbox question I wan't to automatically handle checking/unchecking the checkboxes in a treeview . ... Hi George, check event will fire and end up unchecking all the children ... check state, i.e. between the Checked and UnChecked state. ...
Unchecking a node by checking another node Unchecking parent nodes when a child has been unchecked ... You may want to have a treeview where only a single node can be checked (i.e. the checkboxes mimicking the behavior of ... All Rights Reserved. STC Best Of Show award winner in Online Category STC Distinguished award winner in Online Communication Category.

Dynamic linkbutton event handling - ng.asp-net-forum.windows ... ie treeview - checking & unchecking all subnodes · treeview control · why the vertical line between the two nodes of treeview isn't straight? ...






isp hosting error

hyperlinks from hell...

assign a value to a variable based on a role membership...

optional search summary

looking for post about mrtg display in portal

deployment issue with dnn 1.0.9 ml xxl

only "basic" skin shown on article details page

change the file manager root?

skin list

doesn't work as ascx

user-friendly urls??

installation problems

3.0.4 issue - .net1.2 config error

adding fonts and colors to text/html module

portal templates

image in cmyk mode

file upload security

is bug posting disabled in gemini or ?

adding portal gives error

has anyone cached their user control?

to decompress a file on the server.

favor from a wh4l customer???

object cannot be cast from dbnull to other types. - seeking suggestions on how to recover

[links] separator problem with images

available search modules

sql preprocessor in pa installer

search across portals

time zone

dnn mac and browsers

bug when trying to add a child portal

   
  Privacy | Contact Us
All Times Are GMT