初始化展开一个
<script type="text/javascript">
function ASPxNavBar_Init(s, e) {
s.GetGroup(0).SetExpanded(true);
for (var i = 1; i < s.GetGroupCount(); i++) {
s.GetGroup(i).SetExpanded(false);
}
//s.CollapseAll();
}
function ASPxNavBar_ExpandedChanged(s, e) {
if (e.group.GetExpanded() == true) {
for (var i = 0; i < s.GetGroupCount(); i++) {
if (i == e.group.index) continue;
s.GetGroup(i).SetExpanded(false);
}
}
}
</script>
<div id="divWest1">
<dxnb:ASPxNavBar ID="nbWorkflow" ClientInstanceName="nbWorkflow" Width="180px" runat="server">
<ClientSideEvents ItemClick="function(s, e) {
var w = Ext.getCmp('center-panel');
w.getActiveTab().setTitle(e.item.group.name+'-'+e.item.name);
}" Init="function(s, e) {
ASPxNavBar_Init(s, e)
}" ExpandedChanged="function(s, e) {
ASPxNavBar_ExpandedChanged(s, e);
}" />