views:

64

answers:

0

Hi,

I am trying to set a ITemPlate class to the HeaderTemplate of a specific TabPanel of TabContainer ( AjaxControlTollKit). However, the InstantiateIn method is not firing at all.

Please note that in any tab there is NO gridview.

Code extract:

// In the SharePoint webpart class where tabs are getting created tbcDynamic.Tabs[0].HeaderTemplate = new TabHeaderTemplate(colHeaderLiterals);

// ItemplateClass

internal class TabHeaderTemplate : ITemplate { List _colHeadersLit;

    internal TabHeaderTemplate(List<Label> colHeaderLits)
    {
        _colHeadersLit = colHeaderLits;
    }

    public void InstantiateIn(Control container)
    {
        foreach (Label literal in _colHeadersLit)
        {
            container.Controls.Add(literal);
        }
    }
}

Thanks, Faiz

related questions