Showing posts with label second. Show all posts
Showing posts with label second. Show all posts

Monday, March 26, 2012

Access the control in Tabpanel on TabpanelContainer?

My second tab have some controls, ex. Textbox1, how can i access the value of Textbox1 in Tabpanel2 ?

Thanks,

I believe that Textbox1.Text should work for you... but I cannot try because I'm on diferent machine.


Hi,

Here is an example of referencing it with the help of FindControl method.

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server">
protected void Page_Init(object sender, EventArgs e)
{
TextBox tb = Panel2.FindControl("TextBox1") as TextBox;
tb.Text = DateTime.Now.ToString();

}

</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div><asp:Button runat="server" Text="Button" ID="Button1"></asp:Button>
<ajaxToolkit:TabContainer runat="server" Height="150px" ID="tbcPlanOverview" >
<ajaxToolkit:TabPanel runat="Server" ID="Panel1" HeaderText="Tab One">
<ContentTemplate>
PAGE ONE - Sample HTML Content for Tab
</ContentTemplate>
</ajaxToolkit:TabPanel>
<ajaxToolkit:TabPanel runat="Server" ID="Panel2" HeaderText="Tab Two" >
<ContentTemplate>
PAGE TWO - Sample HTML Content for Tab
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ContentTemplate>
</ajaxToolkit:TabPanel
<ajaxToolkit:TabPanel runat="Server" ID="Panel3" HeaderText="Tab Three">
<ContentTemplate>
PAGE THREE - Sample HTML Content for Tab
</ContentTemplate>
</ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer> <br />
<asp:Image ID="Image1" runat="server" />
<asp:TextBox ID="txtTabSelect" runat="server" />
</div>
</form>
</body>
</html>

Wednesday, March 21, 2012

A feature for Accordion Control

If I click on the pane, it opens.

If I click again on the same pane, nothing happens.

I'd like to have the pane closed on the second click, and don't open ANY panes.

I looked into the source code, and I could modify it myself, but I'd rather have it inside official release.

Dmitri

Yes, I'd like this too, does anyone know if this is possible to do?

yes, this idea is exactly what I was thinking about as well, I have another idea: possibility to have open more panels (when you have first panel opened and click on second one, instead closing first let it opened and open second too) and maybe some icons (likecollapsible Panel has) common for all panel in accordeon with functionality open/close all panels.I know most of it it is possible do through set ofcollapsible Panels, but maybe should be useful to have it in accordeon as well

Peace,

Milo


Hi everyone,

This is popular enough that it's been listed asissue 1679. It's looking like we're going to do this, although I don't have an estimate on when.

Thanks,
Ted

I have made an accordion with a "header" Pane, which stands out from the ones below it (click to close text or something like that would be easy enough).

The contents of the pane are empty. This is an easy work around until the accordion works as requested.


I want to know the work around as well,

so please tell us how you did that!!


If you can have many panes open at the same time, how is it different to having many CollapsiblePanels?

CAn you provide source of your change?


Seems like this has been fixed already. How to use it??