ComponentOne WebMenus and WebBars for ASP.NET: WebMenus and WebBars for ASP.NET Task-Based Help > C1WebTopicBar Tasks > Adding C1WebContentItem to C1WebTopicBar

Adding C1WebContentItem to C1WebTopicBar

To add any control, such as a Table, to C1WebTopicBar you need to add an item of the type, C1WebContentItem, for example:

      Visual Basic

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Me.C1WebTopicBar1.Groups.Clear()

Me.C1WebTopicBar1.Groups.Add(New C1WebTopicBarGroup("ABC"))

Me.C1WebTopicBar1.Groups(0).Items.Add(New C1WebContentItem())

 

Dim item As C1WebContentItem = Me.C1WebTopicBar1.Groups(0).Items(0)

 

Dim table As New Table

item.Add(table)

 

End Sub

      C#

protected void Page_Load(object sender, EventArgs e)

{

   this.C1WebTopicBar1.Groups.Clear();

   this.C1WebTopicBar1.Groups.Add(New C1WebTopicBarGroup("ABC"));

   this.C1WebTopicBar1.Groups[0].Items.Add(new C1WebContentItem());

   C1WebContentItem item = this.C1WebTopicBar1.Groups[0].Items[0];

  

   Table table As new Table();

   item.Add(table);

}


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