Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2014, 12:53 AM
Authorized User
Points: 276, Level: 5
Points: 276, Level: 5 Points: 276, Level: 5 Points: 276, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
Default Chapter 7 - Navigation: TreeView Control Question

Can the TreeView control ONLY be used for navigation? It looks like a great tool for item selection scenarios similar to a checkbox list or radio button list.

Is it possible to adapt it for use as a parent-child node list of checkbox items?

For example, let's say I wanted to traverse many GM vehicles and pick some. The top node would be GM.

GM

---Chevy
------Volt
------Impala
------Cruze

---Buick
------Regal
------Enclave
------Lacrosse

---Cadillac
------Escalade
------CTS

If I checked the GM box, it would select all vehicles. If I checked Chevy, it would select all Chevy's. Alternatively, I could select just individual car models if I wanted.

Could this control be used in that way? I've experimented a bit with it to show the check boxes, but don't know if itwould be the best way to offer a nested selection list.

Thanks so much,
WebDev

Last edited by WebDev123; January 16th, 2014 at 10:24 PM.. Reason: If anyone searches for treeview control, control was misspelled in title.
 
Old January 16th, 2014, 05:50 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Yes, it can, although it doesn't support all the behavior you describe out of the box. I see two solutions:

1. Server side: on the CheckChanged of an item, post back to the server, loop over the child items and check / uncheck them.

2. Client side; do something similar but use jQuery to do all of this client side without a post back.

I don't know of any articles that describe this right away, but I am sure Google knows more.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old January 16th, 2014, 10:15 PM
Authorized User
Points: 276, Level: 5
Points: 276, Level: 5 Points: 276, Level: 5 Points: 276, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
Default

Excellent - #1 was what I was working on, but wanted to see if I was heading down a dead end or not. Thanks. BTW, the way it's presented in the book, it appears as soley a naviagtion control.
 
Old January 17th, 2014, 03:41 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I see. Will try to make that clearer in the upcoming update of the book.

Thanks,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old January 18th, 2014, 06:58 PM
Authorized User
Points: 276, Level: 5
Points: 276, Level: 5 Points: 276, Level: 5 Points: 276, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
Default upcoming update of the book..

To that point, will people who have your book have access to your revisions online? Thanks-
 
Old January 18th, 2014, 07:57 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Nope; the new one will be a new book on its own, without a list of what's new compared to the previous edition.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old January 18th, 2014, 08:46 PM
Authorized User
Points: 276, Level: 5
Points: 276, Level: 5 Points: 276, Level: 5 Points: 276, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
Default

I'm curious, is it on .NET 5 or VB 2013 ?
 
Old January 19th, 2014, 08:28 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It's about ASP.NET 4.5.1 and VS 2013, again covering C# and VB.NET like in the current version.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7 Navigation agiusthomas BOOK: Beginning ASP.NET 4 : in C# and VB 11 June 18th, 2012 12:39 PM
SiteMap Navigation question Quick209 ASP.NET 2.0 Professional 5 August 30th, 2006 12:44 AM
treeview selectaction question lcsgeek ASP.NET 2.0 Basics 1 July 16th, 2006 11:59 PM
treeview question kalchev ASP.NET 2.0 Basics 1 March 22nd, 2006 03:29 PM
question about treeview haiying General .NET 1 September 25th, 2004 05:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.