 |
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
|
|
|
|
|

January 16th, 2014, 12:53 AM
|
|
Authorized User
|
|
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
|
|
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.
|
|

January 16th, 2014, 05:50 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

January 16th, 2014, 10:15 PM
|
|
Authorized User
|
|
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
|
|
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.
|
|

January 17th, 2014, 03:41 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I see. Will try to make that clearer in the upcoming update of the book.
Thanks,
Imar
|
|

January 18th, 2014, 06:58 PM
|
|
Authorized User
|
|
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
|
|
upcoming update of the book..
To that point, will people who have your book have access to your revisions online? Thanks-
|
|

January 18th, 2014, 07:57 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

January 18th, 2014, 08:46 PM
|
|
Authorized User
|
|
Join Date: Aug 2012
Posts: 39
Thanks: 4
Thanked 1 Time in 1 Post
|
|
I'm curious, is it on .NET 5 or VB 2013 ?
|
|

January 19th, 2014, 08:28 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
It's about ASP.NET 4.5.1 and VS 2013, again covering C# and VB.NET like in the current version.
Cheers,
Imar
|
|
 |
|