I've been using this widget for a while now and it works great! Can't say thank you enough... Using it has brought up another issue with group layers that I was wondering if you know how to fix Robert (or anyone else). This is the issue:
Because this widget works like the ArcMap TOC, and doesn't automatically check all of it's child layers when checking a group layer, we have now started using map services where the group layers are turned off when the map loads but the child layers of that group are all on. This means that when the map loads since the group layer is not checked, nothing displays on the map even though the child layers are checked. This is exactly how we want it to work. The difficulty comes in when we start using other processes on the map.
Let's take identify for example. If I use the identify tool, and tell it to look at layers that are currently on, it shouldn't get the child layers (since their parent is off), but it does. The catch is, if I interactively toggle one of the group layers on, and then back off in the TOC, and then run the identify, it will not hit the those layers even though they are in the exact same state they were just before I toggled them on and off.
What I'm wondering is if there is a way to initialize the layers, performing the same thing that happens when manually turning something on and back off in the TOC without any user interaction. It is very confusing for users to be identifying things they don't have turned on, but the alternative of turning everything off by default causes lots of expanding and checking to have to happen when you use grouped layers.