We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

how to keep controls in tabstrip control?

Thread ID:

Created:

Updated:

Platform:

Replies:

72429 Mar 19,2008 12:08 AM Mar 25,2008 07:16 AM General Discussion 2
loading
Tags: General Discussion
pavankumar
Asked On March 19, 2008 12:08 AM

im using a tabstrip control but im not getting how to keep controls in it.
wen im keeping a asp control in it .it is showing a error mess lik dis.
Error Creating Control - TabStrip1Syncfusion.Web.UI.WebControls.Tools.TabItemCollection must have items of type 'Syncfusion.Web.UI.WebControls.Tools.TabStripItem'. 'asp:Label' is of type 'System.Web.UI.WebControls.Label'.
so can anyone please guide me how to keep controls in it.


Administrator [Syncfusion]
Replied On March 24, 2008 02:26 PM

Hi Pavan,

I regret for the delay in getting back to you.

Currently we do not provide any support for adding custom controls inside the TabStrip. The TabStrip can be considered like a panel that is capable of adding TabStripItems to that. The collection of the TabStripItems is called the TabItemCollection. The first set of parent TabStripItems is a set of collection, where, each item contains its own set of Child TabStripItems. In such a collection, you will not be able to add a Label, which is a normal ASP Control.

Please try the below code to understand the same.
[C#]
string str = this.TabStrip1.ID.ToString();
foreach (TabStripItem parenttab in this.TabStrip1.Items)
{
//Returns the first TabStripItem - First Parent Item.
str = str+ "

" + parenttab.ID.ToString();
foreach (TabStripItem childitem in parenttab.Items)
{
//Returns the Child under each parent tab.
str = str + "
" + childitem.ID.ToString();
}
}

Response.Write(str.ToString());

Please try this and let me know if this helps.

Regards,
Nanda



Administrator [Syncfusion]
Replied On March 25, 2008 07:16 AM

Hi,

I regret for the inconvenience caused. If you are trying to insert a Label control to the TabStrip item, you can do this with the help of the Templates.

1. Create and add a TabStripTemplateControl to the TabStrip. Include a template and add a Label control to that. Please refer to the Default.aspx markup in the sample for how to do this.

2. The TemplateID property of TabStripItem can be used to assign this TabStripTemplateControl to the required TabStripItem. You can also do this in code with the following sample snippet.
[C#]
//Adding the template to the first parent tab strip item.
this.TabStrip1.Items[0].TemplateID = "TemplateStrip";


Please refer to the below simple sample that does the same. Please try this and let me know if this helps.
http://websamples.syncfusion.com/samples/Tools.Web/6.1.0.34/F72429/main.htm

Thank you for your patience.

Regards,
Nanda



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;