NetTalk Central

Author Topic: Tree controls in NetTalk?  (Read 3475 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Tree controls in NetTalk?
« on: January 28, 2013, 10:09:55 PM »
Hi all,

I've been caught on other programming related tasks in the past couple of months and havent had the chance to look at NetTalk 7 yet (even though I've bought it!)...

Just got a request for a web service that uses tree controls quite extensively... actually - tree controls with check boxes!  I know that jQuery has some tree control libraries, but have any been incorporated into NetTalk easily so I can populate from a database quickly?

Just to clarify, I am looking to have something similar to the following on the web service:

Code: [Select]
Colours
|
|- [  ] Warm
|      |
|      |- [  ] Red
|      |- [  ] Orange
|       - [x] Yellow
|
 - [  ] Cool
       |
       |- [x] Blue
       |- [  ] Purple
        - [  ] Green

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Tree controls in NetTalk?
« Reply #1 on: January 28, 2013, 10:55:35 PM »
Hi Devan,

while I haven't integrated tree controls yet, that's mostly because I don't yet have a clear idea of what functionality the tree control should have. As you say there are quite a few available, and I want to pick something that actually achieves a result.

So your explanation of your use case is helpful. If I may elaborate, just so I understand what you are after;

this goes on a Form?
it's a way of collecting input from the user?
so they are selecting (possibly multiple) items from a list, and the list is displayed as "indented rows".

hmm - so maybe actually more like a browse? where rows are indented according to level? With an EIP column (the check box?)

I suppose what I'm most interested in is how this data will be stored - ie is it lots of settings in a single record in some table, or is it one setting in lots of rows?

cheers
Bruce


Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Re: Tree controls in NetTalk?
« Reply #2 on: January 29, 2013, 03:17:34 PM »
Thanks for the reply Bruce...

In the case of this project, the tree is really to sit on the left side of a web page so the user can select a filter criteria for a Google Map that will be displayed on the right hand side.

Could also be useful as a filtering tool for a browse sitting beside it I guess.

In my case, the tree would be things like 'Accommodation', 'Restaurants' etc., and when the user selected 'Accommodation', they would be shown a sub list of 'Hotels', 'B&Bs', 'Campsites' etc. from which they can select one or more.  The can also select 'Accommodation' itself, which would auto select the children of that node too.

It would be great if the selection in the tree could populate a session variable or queue so that another control on the page (e.g. a Google Map or NetWebBrowse) could refresh itself based on the criteria.  Would be nice if the tree itself can be populated from a database where the site owner could allocate new parent/child relationships (e.g. if they want to add another Accommodation category later on).


Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Re: Tree controls in NetTalk?
« Reply #3 on: January 29, 2013, 03:20:07 PM »
Addendum:

Bruce - your browse analogy could work.  Indenting based on level is fine, and an EIP field for the checkbox is also cool.  I guess the next question is can we make it LOOK like a tree control, with the
  • and [-] 'buttons' for expanding/collapsing the sections as needed?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Tree controls in NetTalk?
« Reply #4 on: January 29, 2013, 09:23:52 PM »
Hi Devan,

the short answer is yes - the browse already supports "contract and expand" icons.
The trick is having a "browse inside a browse" - which at the moment is mostly working but needs a bit of polish.

cheers
Bruce