View Full Version : How to add Tabs dynamically

9 Jun 2009, 11:09 PM
I have a Grid, Button and a PopUp window, On selecting any row from Grid Button will be enabled and on clicking that Button a PopUp window will get visible. In this window i want to display Tabs dynamically based on the number of records retrieved from Database. And also the name of Tab item is a value from the data retrieved from database.Kindly help me in solving this problem.

10 Jun 2009, 3:34 AM
You can simple add this tabs to the tabpanel. The layout of the TabPanel will manage the displaying of the tabs.

10 Jun 2009, 4:00 AM
I want to know how to add this tabs to TabPanel because i doesn't know how many tabs to create as the data is coming from database.

10 Jun 2009, 4:01 AM

10 Jun 2009, 4:15 AM
Number of tabItems depends on the number of records fetched from database.From database if i get 1 record i have to add 1 tabItem, if 2 records then 2 tabItems and so on.........

10 Jun 2009, 4:21 AM
for(int i=0;i<recordcount;i++){
TabItem item = new TabItem();