ComponentOne WebMenus and WebBars for ASP.NET: WebMenus and WebBars for ASP.NET Task-Based Help > C1WebTopicBar Tasks > Keeping the First Group Open

Keeping the First Group Open

To keep the first group open to prevent it from collapsing in the GroupCollapsed event, use the following code:

      Visual Basic

Protected Sub C1WebTopicBar1_GroupCollapsing(ByVal sender As Object, ByVal e As C1.Web.Command.C1WebGroupBeforeEventArgs) Handles

C1WebTopicBar1.GroupCollapsing

If e.Group.Index = 0 Then

e.Cancel = True

End If

End Sub

      C#

protected void C1WebTopicBar1_GroupCollapsing(object sender, C1.Web.Command.C1WebGroupBeforeEventArgs e)

{

 if (e.Group.Index == 0)

   {

   e.Cancel = true;

   }

}


Send comments about this topic to ComponentOne.
Copyright © 1987-2009 ComponentOne LLC. All rights reserved.