ComponentOne WebMenus and WebBars for ASP.NET (2.0) Search HelpCentral 

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;

   }

}

·      Delphi

procedure C1WebTopicBar1_GroupCollapsing(sender: System.Object; e: C1.Web.Command.C1WebGroupBeforeEventArgs e)

begin

  if e.Group.Index = 0 then

  begin

    e.Cancel := true;

  end;

end;


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