<script type="text/javascript">    function focusItem(panelbar, args) {        var item = args.get_item();        if (item.get_level() == 0)            item.focusFirstChild();    } </script>    <telerik:RadPanelBar ID="PostsRadPanelBar" runat="server" Skin="Web20"        Font-Size="16px"  onclientitemfocus="focusItem"        ExpandMode="SingleExpandedItem" >        <Items>            <telerik:RadPanelItem Text="Office" Expanded="True">                <Items>                    <telerik:RadPanelItem Text="Office Detail">                    </telerik:RadPanelItem>                    <telerik:RadPanelItem Text="Addresses">                    </telerik:RadPanelItem>                    <telerik:RadPanelItem Text="Communications">                    </telerik:RadPanelItem>                    <telerik:RadPanelItem Text="Site Specifics">                    </telerik:RadPanelItem>                </Items>            </telerik:RadPanelItem>            <telerik:RadPanelItem Text="Positions">                <Items>                    <telerik:RadPanelItem Text="Position Detail">                    </telerik:RadPanelItem>                    <telerik:RadPanelItem Text="Assignment Detail (FSO)">                    </telerik:RadPanelItem>                </Items>            </telerik:RadPanelItem>            <telerik:RadPanelItem Text="Products & Services">                <Items>                    <telerik:RadPanelItem Text="Products & Services Information">                    </telerik:RadPanelItem>                </Items>            </telerik:RadPanelItem>            <telerik:RadPanelItem Text="Residences">                <Items>                    <telerik:RadPanelItem Text="Residence Information">                    </telerik:RadPanelItem>                </Items>            </telerik:RadPanelItem>            <telerik:RadPanelItem Text="Vehicles">                <Items>                    <telerik:RadPanelItem Text="Vehicle Detail">                    </telerik:RadPanelItem>                    <telerik:RadPanelItem Text="Purchase & Disposition">                    </telerik:RadPanelItem>                </Items>            </telerik:RadPanelItem>            <telerik:RadPanelItem Text="Security">                <Items>                    <telerik:RadPanelItem Text="Security Information">                    </telerik:RadPanelItem>                </Items>            </telerik:RadPanelItem>        </Items>    </telerik:RadPanelBar>(a) Page loads with the first top level item open and other items closed. (works)
(b) Page loads with the first second level item under the first top level item with focus. (doesn't work)
(c) When a second-level item is selected (including at load) Javascript is called in which I can implement an action (haven't worked on this yet)
(d) When a top level item is selected/expanded, the first second level item under that item is focused/selected (that is, I want it to highlight and also to implement an action). (this doesn't work, and is where I am mainly stuck now).
I have tried to implement the focus/highlight part of (d) through a code sample I found in the Telerik documentation using the onclientitemfocus event, and I get the following error:
htmlfile: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept focus.
I get this same error if I move the JS to onclientitemexpand event handler. And I get it if I set the panel bar so all the top level items are expanded.
What am I doing wrong? I have attached my code sample.
(Also, since some kind person who knows how this works is probably going to look at this, what do I need to do to get the font-size setting to make any difference? It looks like the font-size setting is ignored. Do I actually have to modify some skin class?)
Thank you very much.
