overlapping of panels (ascx) in IE7 - ascx

I have the problem of panel overlapping in IE7 whereas the same code works in IE8.
Has anyone faced this kind of problem?
In the code below, i have a link button, on clicking this, the products frame would be displayed. But this overlaps with the "client products" :
<%# Control Language="C#" AutoEventWireup="true" CodeFile="ClientSummary.ascx.cs" Inherits="ClientSummary" %>
<%# Register Src="~/Controls/ClientSession/CounselorMenuFrame.ascx" TagName="CounselorMenuFrame" TagPrefix="UCC" %>
<%# Register Src="~/Controls/ClientSession/ProductsFrame.ascx" TagName="ProductsFrame" TagPrefix="UCC" %>
<%# Register Src="~/Controls/ClientSession/ProductDetailFrame.ascx" TagName="ProductDetailFrame" TagPrefix="UCC" %>
<%# Register Src="~/Controls/ClientSession/ClientDetailFrame.ascx" TagName="ClientDetailFrame" TagPrefix="UCC" %>
<asp:Panel ID="pnlClntSummary" runat="server" EnableViewState="true" >
<asp:Panel ID="pnlClientDetailFrame" runat="server" Style="width: 950px;" >
<UCC:ClientDetailFrame id="clientDetailFrame" runat="server" />
</asp:Panel>
<asp:Panel ID="pnlProductDetailFrame" runat="server" Style="width: 950px;" >
<UCC:ProductDetailFrame id="productDetailFrame" runat="server"/>
</asp:Panel>
<div id="slider" style="width:950px;">
asp:Panel ID="pnlProductsFrame" runat="server" Style="width: 950px;" >
<table style="width:900px;" >
<tr><td></td><td>
<asp:LinkButton Text="Client Information" ID="clientDetail" Font-Underline="true"
Font-Bold="true" Font-Names="Calibri" Font-Size="Medium" runat="server"
onclick="clientDetail_Click"/>
</td>
</tr>
<tr>
<td valign="top" style="float:left" align="left">
<div style="float:left;vertical-align:top;">
<div id="content" class="contentMenu">
<UCC:ProductsFrame id="productsFrame" runat="server" />
</div>
</div>
</td>
<td valign="top" style="width:900px;" align="left">
<div id="header1" style="float:left;position:relative;width:45px;">
<table border="0">
<tr>
<td valign="top" style="width:30px;"
onclick="verticalprocessClick(document.getElementById('header1'))">
<div style="padding: 2px; cursor: pointer; vertical-align: top;">
<div style="float: left; vertical-align: bottom;">
<table>
<tr onclick="ImageChangePFrame(imgPF)">
<td class="VerticalLine">
</td>
<td>
<img id="imgPF" src="../Images/icon_expand.png" alt="(Show Details...)"
onload="ProductFrameHide(this)"/>
<div id="divClientProducts" runat="server"
style="float:left;font-family:Calibri;top:1%;left:25%;position:relative;font-size:13px;
color:Gray;text-align:center;">
C<br />
L<br />
I<br />
E<br />
N<br />
T<br />
<br />
P<br />
R<br />
O<br />
D<br />
U<br />
C<br />
T<br />
S<br />
</div>
</td>
<td class="VerticalLine">
</td>
</tr>
</table>
</div>
</div>
</td>
<td>
</td>
</tr>
</table>
</div>
<div id="divTransactionDesktop" style="float:left;width:600px; height:100px;" >
<asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<asp:PlaceHolder ID="MainFrameHolder" runat="server"></asp:PlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
<asp:HiddenField ID="hdnRowValue" runat ="server" Value="0" />
</div>
</td>
</tr>
</table>
</asp:Panel>
</div>
<asp:HiddenField ID="hdnLastFocus" runat="server" />
<asp:HiddenField ID="hdnKeyMapping" runat="server" />
</asp:Panel>

I found a solution for overlapping of panels in IE7. It was the height attribute which made a difference. Removing the height attribute or mentioning the exact value in pixels, solves this problem.

Related

modal popup does not work on button click in tab container

I have a page which contains multiple tab. I need to have one modal popup to be popped up to show different message. I tried in the following ways but failed.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="userUpdatePanel" runat="server">
<ContentTemplate>
<center style="margin-top: 0px">
<ajaxToolkit:TabContainer ID="TabContainer1" AutoPostBack="true" runat="server" ActiveTabIndex="0">
<cc1:TabPanel runat="server" HeaderText="Country" ID="TabPanel1">
<ContentTemplate>
<center>
<input type="hidden" id="hidUserID" runat="server" value="0" />
<table class="contentTable">
<tr class="contentRow">
<td class="columnName">
Action
</td>
<td class="columnData">
<asp:RadioButtonList ID="rbtnCountryAddorModify" RepeatDirection="Horizontal" AutoPostBack="true"
runat="server" >
<asp:ListItem Value="Add" Selected="True">Add</asp:ListItem>
<asp:ListItem Value="Modify">Modify</asp:ListItem>
</asp:RadioButtonList>
</td>
<td></td>
</tr>
<tr class="contentRow">
<td class="columnName">
Country
</td>
<td class="columnData">
<ajaxToolkit:ComboBox ID="cmbCountry" runat="server" AutoPostBack="true"
CssClass="AjaxToolkitStyle" DropDownStyle="DropDown" CausesValidation="True"
onselectedindexchanged="cmbCountry_SelectedIndexChanged">
<asp:ListItem Value="0">--Select--</asp:ListItem>
</ajaxToolkit:ComboBox>
</td>
<td></td>
</tr>
<tr class="alternateRow">
<td class="columnName">
New Country Name
</td>
<td class="columnData">
<asp:TextBox ID="txtCountryName" runat="server" Width="230px" ValidationGroup="user"></asp:TextBox>
</td>
<td></td>
</tr>
<tr class="contentRow">
<td class="buttonRow" colspan="2">
<asp:button ID="btnSaveCountry" runat="server" text="Submit" OnClick="btnSaveCountry_Click"
/>
<asp:Button ID="reset" runat="server" Text="reset" OnClick="reset_Click" />
<asp:Button ID="Button1" runat="server" Text="Hiden" />
</td>
</tr>
</table>
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none" >
<br />
<asp:Label ID="lblMsg" runat="server" Height="30px" ForeColor="red"></asp:Label>
<table style="width: 270px">
<tr>
<td >
</td>
<td>
<asp:Button ID="btnCancel" runat="server" Text="Ok" />
</tr>
</table>
</asp:Panel>
<cc1:ModalPopupExtender ID="ModalPopupExtenderMsg" runat="server"
TargetControlID="Button1"
PopupControlID="Panel1"
BackgroundCssClass="modalBackground"
DropShadow="true"
CancelControlID="btnCancel" >
</cc1:ModalPopupExtender>
</ContentTemplate>
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" AutoPostBack="true" runat="server" HeaderText="Division">
<ContentTemplate>
<center>
<input type="hidden" id="Hidden1" runat="server" value="0" />
<table class="contentTable">
<tr class="contentRow">
<td class="columnName">
Action
</td>
<td class="columnData">
<asp:RadioButtonList ID="rbtnDivProvAddorModify" RepeatDirection="Horizontal" AutoPostBack="true"
runat="server" >
<asp:ListItem Value="Add" Selected="True">Add</asp:ListItem>
<asp:ListItem Value="Modify">Modify</asp:ListItem>
</asp:RadioButtonList>
</td>
<td></td>
</tr>
<tr class="contentRow">
<td class="columnName">
Country
</td>
<td class="columnData">
<ajaxToolkit:ComboBox ID="cmbCountryForDiv" runat="server" AutoPostBack="true"
CssClass="AjaxToolkitStyle" DropDownStyle="DropDown" CausesValidation="True"
onselectedindexchanged="cmbCountryForDiv_SelectedIndexChanged">
<asp:ListItem Value="0">--Select--</asp:ListItem>
</ajaxToolkit:ComboBox>
</td>
<td></td>
</tr>
<tr class="contentRow">
<td class="columnName">
Division/Province
</td>
<td class="columnData">
<ajaxToolkit:ComboBox ID="cmbDivision" runat="server" AutoPostBack="true"
CssClass="AjaxToolkitStyle" DropDownStyle="DropDown" CausesValidation="True"
onselectedindexchanged="cmbDivision_SelectedIndexChanged">
<asp:ListItem Value="0">--Select--</asp:ListItem>
</ajaxToolkit:ComboBox>
</td>
<td></td>
</tr>
<tr class="alternateRow">
<td class="columnName">
New Division/Province Name
</td>
<td class="columnData">
<asp:TextBox ID="txtDivProvince" runat="server" Width="230px" ValidationGroup="user"></asp:TextBox>
</td>
<td></td>
</tr>
<tr class="contentRow">
<td class="buttonRow" colspan="2">
<asp:button ID="btnSaveDivision" runat="server" text="Submit" OnClick="btnSaveDivision_Click"
/>
<asp:Button ID="Button3" runat="server" Text="reset" OnClick="reset_Click" />
</td>
</tr>
</table>
</ContentTemplate>
<cc1:TabPanel ID="TabPanel4" AutoPostBack="true" runat="server" HeaderText="Thana">
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel5" AutoPostBack="true" runat="server" HeaderText="Municipality">
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel6" AutoPostBack="true" runat="server" HeaderText="UPHeadQuarter">
</cc1:TabPanel>
</ajaxToolkit:TabContainer>
<asp:Button ID="Button4" runat="server" Text="pOPUp" onclick="Button4_Click" />
<asp:Button ID="Button2" runat="server" Visible="false" Text="Hidden" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetControlID="Button2"
PopupControlID="Panel4"
BackgroundCssClass="modalBackground"
DropShadow="true"
CancelControlID="Button7" >
</cc1:ModalPopupExtender>
<asp:Panel ID="Panel4" runat="server" CssClass="modalPopup" Style="display: none" >
<br />
<asp:Label ID="Label3" runat="server" Height="30px" ForeColor="red"></asp:Label>
<table style="width: 270px">
<tr>
<td >
</td>
<td>
<asp:Button ID="Button7" runat="server" Text="Ok" />
</tr>
</table>
</asp:Panel>
</center>
</ContentTemplate>
</asp:UpdatePanel>
In .cs file I have the code as follows.
protected void showModalMsgBox(string msg,AjaxControlToolkit.ModalPopupExtender mdlPopupMsg) {
switch (msg)
{
case "success":
lblMsg.Text = "Data saved successfully.";
break;
default:
lblMsg.Text = "Data is not saved. Please contact with administrator.";
break;
}
//userUpdatePanel.Update();
mdlPopupMsg.Show();
}
protected void btnSaveDivision_Click(object sender, EventArgs e)
{
showModalMsgBox("Sample", ModalPopupExtenderMsg);
}
protected void btnSaveCountry_Click(object sender, EventArgs e)
{
showModalMsgBox("Sample", ModalPopupExtenderMsg);
}
It shows modal popup for country but not for division. But If I write
protected void btnSaveDivision_Click(object sender, EventArgs e)
{
showModalMsgBox("Sample", ModalPopupExtender1);
}
protected void btnSaveCountry_Click(object sender, EventArgs e)
{
showModalMsgBox("Sample", ModalPopupExtender1);
}
It shows modal popup neither for country nor for division. I need a common popup for each tab container. Can I do that? or what can I do here? Is there any body to help? Thanks.

How to get rid of warnings such as "attrs cannot be resolved as a member of cc"?

How can I get rid of warnings for tags having "cc.attrs.onCompleteJS", "cc.attrs.updateAjax" and "cc.attrs.imageValue"? Each warning has same explanation as "attrs cannot be resolved as a member of cc". I use JSF 2.x as a framework and Eclipse as an editor.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:p="http://primefaces.org/ui">
<composite:interface>
<composite:attribute name="imageValue"></composite:attribute>
<composite:attribute name="updateAjax"></composite:attribute>
<composite:attribute name="onCompleteJS"></composite:attribute>
</composite:interface>
<composite:implementation>
<h:outputStylesheet library="css" name="regionTreeComponent.css"></h:outputStylesheet>
<table style="width: 100%" cellspacing="0" cellpadding="5">
<tr>
<td style="width: 100%">
<p:autoComplete forceSelection="true" id="sTxtRegionName" value="#{regionTreeBean.sRegionName}"
completeMethod="#{regionTreeBean.completeRegionName}" styleClass="sTxtRegionName" />
</td>
<td>
<p:commandButton styleClass="rSearchButton" id="iconOnly" icon="ui-icon-search" actionListener="#{regionTreeBean.searchSelectNode}"
oncomplete="#{cc.attrs.onCompleteJS}" update=":mainForm:treeComponent:regionTree #{cc.attrs.updateAjax}"/>
</td>
</tr>
</table>
<hr style="width: 100%;"></hr>
<div style="text-align: center;">
<h:graphicImage styleClass="headerImage" library="images" name="#{cc.attrs.imageValue}"></h:graphicImage>
<p:outputLabel styleClass="headerLabel" value="#{msgs['treeComponent.regions']}"></p:outputLabel>
</div>
<p:tree value="#{regionTreeBean.rootNode}" var="node"
animate="true" selection="#{regionTreeBean.selectedNode}"
selectionMode="single" styleClass="tree" id="regionTree">
<p:ajax event="select" listener="#{regionTreeBean.onNodeSelect}" update="#{cc.attrs.updateAjax}" oncomplete="#{cc.attrs.onCompleteJS}" />
<p:treeNode styleClass="slTreeNode" icon="region">
<h:outputText value="#{node.REGION_NAME}"/>
</p:treeNode>
</p:tree>
</composite:implementation>
</html>

Selecting a single row in component art grid not working

I have Question about component art grid.
Have anyone struggled with the selecting of a single row where your attribite is AllowMultipleSelect="false" but you are still able to select Multiple rows.
I just can't seem to get around this because I only want the selected row highlighted with what ever color the selectedRowCssClass color is.
Here is my front end code:
<%# Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="ComponentArt" %>
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<base target="_self" />
<title>iView Trend Data</title>
<link href="Assets/OldCss/gridStyle.css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<asp:HiddenField ID="ParamA" runat="server" />
<asp:HiddenField ID="ParamB" runat="server" />
<table style="width:100%; Height:100%;" >
<tr>
<td>
<ComponentArt:CallBack id="CallBack1" CacheContent="false" width="100%" Height="100%" runat="server">
<Content>
<ComponentArt:Grid ID="Grid1"
CssClass="Grid"
runat="server"
RunningMode="Client"
ShowFooter="false"
ImagesBaseUrl="~/Assets/Image/Grid/"
Sort="DateTime"
ScrollBar="Auto"
ScrollTopBottomImagesEnabled="true"
ScrollTopBottomImageHeight="2"
ScrollTopBottomImageWidth="16"
ScrollImagesFolderUrl="~/Assets/Image/Grid/"
ScrollButtonWidth="16"
ScrollButtonHeight="17"
ScrollBarCssClass="ScrollBar"
ScrollGripCssClass="ScrollGrip"
ScrollBarWidth="16"
ScrollPopupClientTemplateId="ScrollPopupTemplate"
Width="760"
Height="618"
AllowTextSelection="false"
AllowHorizontalScrolling="True"
AllowMultipleSelect="false"
PageSize="30"
ShowHeader="true"
ShowSearchBox="true"
SearchOnKeyPress="true"
Visible="true"
AllowVerticalScrolling="False"
GroupingNotificationText="">
<Levels>
<ComponentArt:GridLevel
DataKeyField="DateTime"
ShowTableHeading="False"
ShowSelectorCells="False"
HeadingCellCssClass="HeadingCell"
HeadingCellHoverCssClass="HeadingCellHover"
HeadingCellActiveCssClass="HeadingCellActive"
HeadingTextCssClass="HeadingCellText"
DataCellCssClass="DataCell"
RowCssClass="DataRow"
SelectedRowCssClass="SelectedRow"
SortAscendingImageUrl="asc.gif"
SortDescendingImageUrl="desc.gif"
ColumnReorderIndicatorImageUrl="reorder.gif"
SortedDataCellCssClass="SortedDataCell"
SortImageWidth="14"
SortImageHeight="14"
AllowGrouping="false"
AlternatingRowCssClass="AlternatingRow">
<Columns>
<ComponentArt:GridColumn DataField="DateTime" Width="100" FormatString="yyyy-MM-dd HH:mm" Visible="false"/>
</Columns>
</ComponentArt:GridLevel>
</Levels>
<clienttemplates>
<ComponentArt:ClientTemplate Id="ScrollPopupTemplate">
<table cellspacing="0" cellpadding="2"
border="0" class="ScrollPopup">
<tr>
<td style="width:50px;">
<div style="font-size:10px;font-family:MS Sans Serif; text-overflow:ellipsis; overflow:visible;">
<nobr>## DataItem.GetMember("DateTime").Text ##</nobr>
</div>
</td>
</tr>
</table>
</ComponentArt:ClientTemplate>
</clienttemplates>
</ComponentArt:Grid>
</Content>
<LoadingPanelClientTemplate>
<table width="100%" align="center" style="position:relative;top:250px">
<tr>
<td style="color:#cee820" align="right">Loading..</td>
<td align="left"> <img src="./images/ajax-loader.gif" width="48" height="48" border="0"/></td>
</tr>
</table>
</LoadingPanelClientTemplate>
</ComponentArt:CallBack>
</td>
</tr>
</table>
</form>
</body>
</html>
I had a similar problem, which turned out to be because values of the DataKeyField had spaces in them.

Accordion inside another accordion

Iam using ajax accordion. Is it possible to add an ajax accordion inside another accordion.
I tried adding this, but the accordion inside is not loading(not getting displayed)
<ajax:Accordion ID="accordionCountry" HeaderCssClass="headerStyle marginUpDown" HeaderSelectedCssClass="headerSelectedStyle" ContentCssClass="contentBackground" runat="server" SelectedIndex="-1" FadeTransitions="true" SuppressHeaderPostbacks="true" TransitionDuration="250" FramesPerSecond="40" RequireOpenedPane="false" AutoSize="None">
<HeaderTemplate>
<asp:Panel ID="pnlShowCategory" runat="server" CssClass="cursorPointer categoryPanelBackground marginUpDown">
<table cellpadding="0" cellspacing="0" width="98%">
<tr>
<td align="left">
<asp:Label ID="lblCategoryName" runat="server" Text='<%# Eval("CategoryName") %>'
CssClass="paddingLeft"></asp:Label>
</td>
<td align="right">
<asp:Image ID="Image3" runat="server" ImageAlign="Right" Height="20px" CssClass="verticalAlignMiddle" />
<asp:HiddenField ID="hdnCategoryId" runat="server" Value='<%# Eval("CategoryId") %>' />
</td>
</tr>
</table>
</asp:Panel>
</HeaderTemplate>
<ContentTemplate>
<ajax:Accordion ID="accordionCountry1" HeaderCssClass="headerStyle marginUpDown" HeaderSelectedCssClass="headerSelectedStyle"
ContentCssClass="contentBackground" runat="server" SelectedIndex="-1" FadeTransitions="true"
SuppressHeaderPostbacks="true" TransitionDuration="250" FramesPerSecond="40"
RequireOpenedPane="false" AutoSize="None">
<HeaderTemplate>
</HeaderTemplate>
<ContentTemplate>
<asp:Panel ID="pnl" runat="server" CssClass="cursorPointer categoryPanelBackground marginUpDown">
<table cellpadding="0" cellspacing="0" width="98%">
<tr>
<td align="left">
<asp:Label ID="lblSubCategoryName" runat="server" Text='<%# Eval("SubCategoryName") %>'
CssClass="paddingLeft"></asp:Label>
</td>
<td align="right">
<asp:Image ID="Image3" runat="server" ImageAlign="Right" Height="20px" CssClass="verticalAlignMiddle" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</ajax:Accordion>
</ContentTemplate>
</ajax:Accordion>
try to use jQuery for accordion, it's better, check below link out :
click run after you click the link below
(function($) {
var allPanels = $('.accordion .dd').hide();
$('.accordion .dt a').click(function() {
allPanels.slideUp();
$(this).parent().next().slideDown();
return false;
});
})(jQuery);
Check This

ajaxToolkit:ModalPopupExtender drag issue

When I try to drag the popup, first I have to click on draging position. But when I try to click on the draging enable area, popup window goes to another position. Even I try again it continuously happens.
here is my mark up:
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="btnEditAddress"
PopupControlID="Panel1" BackgroundCssClass="modalBackground" OkControlID="btnOKAddress"
CancelControlID="btnCancelAddress" DropShadow="true" PopupDragHandleControlID="headHolder"
X="270" Y="130" />
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="width: 320px;
display: none;">
<div>
<div id="headHolder" runat="server" class="addressEditHead" style="height: 20px;
padding-top: 5px;">
<span style="padding-left: 5px;" id="addressType" />
</div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div style="height: 25px; text-align: center;">
<asp:Button ID="btnOKAddress" runat="server" CssClass="button" Text="Save" OnClientClick="saveAddress();" />
<asp:Button ID="btnCancelAddress" runat="server" CssClass="button" Text="Cancel" />
<asp:HiddenField ID="hdnRelatedTable" runat="server" />
<asp:HiddenField ID="hdnRelatedID" runat="server" />
</div>
</div>
</asp:Panel>
Hi, All I found the solution. I upgrade the ajaxtoolkit to latest version. Now It's working coreclty
I found the solution. I upgraded the ajaxtoolkit to latest version. Now It's working coreclty.