Showing posts with label everytime. Show all posts
Showing posts with label everytime. Show all posts

Monday, March 26, 2012

Tab Control - create tab on gridview selectindexchanged - code posted

I am using ajax tab control. I want to create a new tab everytime i click on the select of the gridview. Problem is it only allows me to create 1 tab. When I click on another select in the gridview - it doesn't allow to create another tab and gives me an error.

Is there another way to do this?

protectedvoid gv1_SelectedIndexChanged(object sender,EventArgs e)

{

UserControl ucR = (UserControl)LoadControl("../test.ascx");

ucR.ID = ((GridView)sender).SelectedDataKey.Value.ToString();

TabPanel tab =newTabPanel();

tab.Controls.Add(ucR);

tab.HeaderText = ((GridView)sender).SelectedDataKey.Value.ToString();

tcResults.Tabs.Add(tab);

}

After postback it loses the tabs - had to load in session and re-make the tabs in page_init


What error you are getting ?

Wednesday, March 21, 2012

TabContainer doesnt throw ActiveTabChanged Event!

Hi,

I am dynamically adding the tabs to the TabContainer control in the Page_Init event.

These are recreated everytime the page loads.

However when I change the selected tab on the client side and do a postback the ActiveTabChanged Event doesn't fire.

Any ideas?

I am having the same problem. Everything else is working except for the firing of this event. Anyone have a workaround?
yes, found the same problem. had a brief look at the source but couldn't find a obvious answer. bit of a showstopper for me, If anybody has a solution even if it to amend the source I would be happy.
http://forums.asp.net/thread/1556226.aspx?