Search code examples
dynatree

Mixing radio and checkbox in a Dynatree


I´d like to create a tree mixing radio and checkbox .... The first section will use radio (to select just one Base layer in my map) and the others sections will use checkbox (to select any layers to show up)

Is it posible to do that with dynatree? Image attached...

Tree sample


Solution

  • Checkboxes and Radioboxes are simply CSS styled <span> tags, so you can add your own CSS that overrides this based on some custom node classes. You should then use selectMode: 2, and implement the desired behavior in the onSelect handler.