如果一个面板打开关闭所有其他面板,如何在datagrid内的单击按钮上隐藏其他面板。 [英] How to hide other panels on click button inside datagrid , if one panel is open close all other panels.
本文介绍了如果一个面板打开关闭所有其他面板,如何在datagrid内的单击按钮上隐藏其他面板。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有数据网格,当我点击加上它显示面板时我有面板,当我点击减去面板被禁用(显示:无)
但是当我点击其他+按钮时,我希望所有其他面板都关闭。
I have datagrid inside that i have panel when i click on plus it shows panel , when i click on minus the panel is disabled(display:none)
But when i click on other + button i want all other panel to get closed.
function OnImageClick(Obj, PnlId, PnlIdSub) {
//alert(Obj + ": " + PnlId);
var Src = Obj.src.split("/")[Obj.src.split("/").length - 1];
if (Src == "Plus.gif") {
document.getElementById(Obj.id).src = "Images/Minus.gif";
document.getElementById(Obj.id).title = "Expand";
document.getElementById(PnlId).style.display = "block";
document.getElementById(PnlIdSub).style.display = "block";
}
else if (Src == "Minus.gif") {
document.getElementById(Obj.id).src = "Images/Plus.gif";
document.getElementById(Obj.id).title = "Collapse";
document.getElementById(PnlId).style.display = "none";
document.getElementById(PnlIdSub).style.display = "none";
}
}
<asp:Panel ID="PnlSub" runat="server" style="display:none" GroupingText="Submit">
<div style="width:800px;">
<div style="width:400px;float:left;">
<asp:RadioButtonList ID="TransType" runat="server" style="margin-left:10px" RepeatDirection="Horizontal" TextAlign="Right">
<asp:ListItem Value="I">Interview
<asp:ListItem Value="S">Shortlist
<asp:ListItem Value="R">Reject
<asp:Label ID="lblRemarks" style="margin-left:10px" runat="server" Text="Remarks:" >
<asp:TextBox ID="Remarks" runat="server" Width="200px" >
<asp:Button ID="Submit" runat="server" CommandName="SUBMIT" cssclass="CB_Big" Text="Submit" />
Img.Attributes.Add("onclick", "OnImageClick(this,'" & PnlChild.ClientID & "','" & PnlSub.ClientID & "')")
How can i close rest panel if i click on one of the + button?</div></div>
推荐答案
我无法理解你的问题...我认为这是一个简单的问题......无论如何你检查面板代码如invisible = true;如果真的存在,请替换为false;
i cant understand your problem ...i think this is a simple problem...anyway you check the panel code like invisible=true; if the true are there please replace as false;
这篇关于如果一个面板打开关闭所有其他面板,如何在datagrid内的单击按钮上隐藏其他面板。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文