This is a migrated thread and some comments may be shown as answers.

Issues with dynamically openned tabs and closing it

5 Answers 354 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Motahera
Top achievements
Rank 1
Motahera asked on 10 Feb 2012, 10:58 AM
Hi Kendo Team,
I have several issues with the TabStrip control -
1. How to select a dynamically added tab?
2. How to prevent the tab load after selecting it?
3. How to remove a tab by clicking on a control on that tab?
4.  After dynamically opening a tab and selecting existing tabs randomly the tab contents get mixed up in other tabs.
5. even though a second grid is initialized after the 2nd tab is selected, the grid content spills over the tab area.

I have attached a sample(I ran the sample from ~\kendoui\examples\web\Sample) where all these scenario can be seen.
We need this prototype to work to decide if we can use the KendoUI in our main project.

Thanks in advance for you help.

5 Answers, 1 is accepted

Sort by
0
Motahera
Top achievements
Rank 1
answered on 10 Feb 2012, 11:02 AM
In the sample you can see we used image to close the tab like -
                   <li id="act">
                        My activities <img src="images/DeleteIcon.gif" style="padding-left:10px;z-index:1111" onclick="tabStrip.remove(this)">
                    </li>

How can we add this image in dynamically added tabs?
0
Kamen Bundev
Telerik team
answered on 10 Feb 2012, 04:54 PM
Hello Motahera,

I've replied in the support ticket you also filed for these questions.

Kind regards,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Leonel
Top achievements
Rank 1
answered on 18 Feb 2012, 02:27 AM
is possible icon can be added close to the dynamic tabstrip tab?
0
Kamen Bundev
Telerik team
answered on 20 Feb 2012, 10:06 AM
Hi Leonel,

You can use the encoded property to enable html content for the tab text. Then you can inset the close button as an image or sprite element and set its onclick handler to handle the closure. Something like this:
tabStrip.append({
    text: "A Tab <img src='close.gif' onclick='tabStrip.remove($(this).closest(\"li\"))'>",
    encoded: false
});


Greetings,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
krishna surapaneni
Top achievements
Rank 2
answered on 24 Apr 2012, 10:24 AM
Hi
I am Also Facing the same issue please share the solution..
Tags
TabStrip
Asked by
Motahera
Top achievements
Rank 1
Answers by
Motahera
Top achievements
Rank 1
Kamen Bundev
Telerik team
Leonel
Top achievements
Rank 1
krishna surapaneni
Top achievements
Rank 2
Share this question
or