我还有一个问题。 我有3个选项卡面板,每种类型的功能。所有包含不同功能的树视图,用于不同的功能。
<div Class="divopt">
<cc1:TabContainer runat="server" CssClass="leftspace">
<cc1:TabPanel ID="addpaneltab" runat="server" HeaderText="Add" >
<ContentTemplate>
<asp:LinkButton runat="server" Text="Add Institutes" ID="AddInstitutes" OnClientClick="displayPopup(); return false;"></asp:LinkButton>
<asp:TreeView ID="TreeMenuView1" runat="server" OnSelectedNodeChanged="TreeMenuView1_SelectedNodeChanged" NodeStyle-NodeSpacing="5px" CssClass="leftspace" ToolTip="Add new Details">
</asp:TreeView>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel runat="server" ID="editpaneltab" HeaderText="Edit">
<ContentTemplate>
<asp:TreeView ID="TreeViewEdit" runat="server" OnSelectedNodeChanged="TreeViewEdit_SelectedNodeChanged" NodeStyle-NodeSpacing="5px" CssClass="leftspace" >
</asp:TreeView>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel runat="server" ID="deletepaneltab" HeaderText="Delete">
<ContentTemplate>
<asp:TreeView ID="TreeViewDelete" runat="server" OnSelectedNodeChanged="TreeViewDelete_SelectedNodeChanged" NodeStyle-NodeSpacing="5px" CssClass="leftspace" >
</asp:TreeView>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
</div>
在addpaneltab中选择节点时。我正在打开一个更新面板。 现在问题是如果我点击该面板中的节点,更新面板也会打开其他2面板选项卡。 我打开更新面板的代码是 -
protected void TreeMenuView1_SelectedNodeChanged(object sender, EventArgs e)
{
instext.Text = TreeMenuView1.SelectedValue;
int level = TreeMenuView1.SelectedNode.Depth;
if(level==0)
{
idGrade.Style.Add("display", "block");
idCamera.Style.Add("display", "none");
idClass.Style.Add("display", "none");
}
else if (level==1)
{
TextGrade.Text = TreeMenuView1.SelectedValue;
idClass.Style.Add("display", "block");
idGrade.Style.Add("display", "none");
idCamera.Style.Add("display", "none");
}
else
{
idCamera.Style.Add("display", "block");
idClass.Style.Add("display", "none");
idGrade.Style.Add("display", "none");
}
}
idgrade,idclass,idcamera是创建updatepanel的DIV。