Welcome Guest Search | Active Topics | Sign In | Register

Programmatically adding ToolBarItems to ToolBarItemCollection, then to Toolbar Options
oaksagelew
Posted: Wednesday, November 4, 2009 12:49:00 PM
Rank: Newbie
Groups: Member

Joined: 11/4/2009
Posts: 2
I'm trying to create a toolbar on the fly (i.e., not through declarations in .aspx file). I create some ToolBarItems, then add them to a ToolBarItemCollection.

But how do I add the ToolBarItemCollection to the ToolBar itself? The Items property is read-only, and I can't find anything that suggests how to do that. Surely this must be a common scenario, so how do I handle this?

Thanks.
eo_support
Posted: Wednesday, November 4, 2009 1:14:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
You do not. You do it something like this:

Code: C#
ToolBar1.Items.Add(your_new_toolbar_item);


Thanks
oaksagelew
Posted: Wednesday, November 4, 2009 1:23:58 PM
Rank: Newbie
Groups: Member

Joined: 11/4/2009
Posts: 2
Right. Of course. Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.