When a pop up calendar displays for selecting a date, the calendar pops up over the "update selection" button, when a date is selected that is within the area of the submit button that is under the calendar - the "update selection" is fired and the date is not selected?
stack overflow post seems to address similar behavior but I don't understand how to apply fix in my situation;
jquery-ui datepicker change z-index
with calendar:
<ul data-role="listview" id="ul-edit-picks" data-divider-theme="a" data-inset="true">
<li data-role="list-divider">
<h2 id="itemTitle">
FDID: <asp:Label ID="LabelFDID" runat="server" Text='<%# Session("FDID")%>' Font-Bold="True" Font-Size="Medium"></asp:Label>
</h2>
</li>
<li>1st Day:
<asp:TextBox ID="CHOICE1TextBox" runat="server" Text='' ReadOnly="True"></asp:TextBox>
<asp:HiddenField ID="CHOICE1HiddenField" runat="server" Value='<%# Bind("CHOICE1")%>' /></li>
<li>2nd Day:
<asp:TextBox ID="CHOICE2TextBox" runat="server" Text='' ReadOnly="True"></asp:TextBox>
<asp:HiddenField ID="CHOICE2HiddenField" runat="server" Value='<%# Bind("CHOICE2")%>' /></li>
<li>3rd Day:
<asp:TextBox ID="CHOICE3TextBox" runat="server" Text='' ReadOnly="True"></asp:TextBox>
<asp:HiddenField ID="CHOICE3HiddenField" runat="server" Value='<%# Bind("CHOICE3")%>' /></li>
<li>4th Day:
<asp:TextBox ID="CHOICE4TextBox" runat="server" Text='' ReadOnly="True"></asp:TextBox>
<asp:HiddenField ID="CHOICE4HiddenField" runat="server" Value='<%# Bind("CHOICE4")%>' /></li>
<li>5th Day:
<asp:TextBox ID="CHOICE5TextBox" runat="server" Text='' ReadOnly="True"></asp:TextBox>
<asp:HiddenField ID="CHOICE5HiddenField" runat="server" Value='<%# Bind("CHOICE5")%>' /></li>
<li>6th Day:
<asp:TextBox ID="CHOICE6TextBox" runat="server" Text='' ReadOnly="True"></asp:TextBox>
<asp:HiddenField ID="CHOICE6HiddenField" runat="server" Value='<%# Bind("CHOICE6")%>' /></li>
<li>7th Day:
<asp:TextBox ID="CHOICE7TextBox" runat="server" Text='' ReadOnly="True"></asp:TextBox>
<asp:HiddenField ID="CHOICE7HiddenField" runat="server" Value='<%# Bind("CHOICE7")%>' /></li>
</ul>
<ul data-role="listview" id="ul-edit-picks" data-divider-theme="a" data-inset="true">
<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
Text="Update Selections"></asp:Button>
<asp:Button ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel"></asp:Button>
</ul>
found in other SO post after determining it to be related to z-index:
Trouble with jQuery Dialog and Datepicker plugins
<style type="text/css">
.ui-datepicker
{
z-index: 1003 !important; /* must be > than popup editor (1002) */
}
</style>
I am using asp.net web forms for developing mobile application
My Code:
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MobileApplication.Default" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>Mobile WebForms</title>
<meta charset="urf-8" />
<meta name="viewport" content="width=device-width" />
<style type="text/css">
body
{
font-family:Verdana;
height: 119px;
}
label
{
font-size:11pt;
font-family: Arial, Helvetica, sans-serif;
display:block;
margin-right:50px;
}
input[type=text]
{
width:200px;
height:15px;
margin-left:15px
}
.content
{
width:350px;
margin:0px auto;
}
header
{
width:350px;
text-align:center;
font-size:15px;
font-weight:bold;
}
.button
{
width:350px;
text-align:center;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div data-role="content">
<asp:Table ID="Table1" runat="server" GridLines="Both" Height="107px" Width="210px">
<asp:TableRow runat="server">
<asp:TableCell runat="server">
<asp:Label ID="Label1" runat="server" Text="Request ID"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Text="9015/DOM/NDA/0711"></asp:TextBox>
</asp:TableCell>
<asp:TableCell runat="server">
<asp:Label ID="Label2" runat="server" Text="Request Type" ></asp:Label>
<asp:TextBox ID="TextBox2" runat="server" Text="Domestic Travel - Self (Employee)"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell runat="server">
<asp:Label ID="Label3" runat="server" Text="Request Status"></asp:Label>
<asp:TextBox ID="TextBox3" runat="server" Text="Pending With L1 Manager"></asp:TextBox>
</asp:TableCell>
<asp:TableCell runat="server">
<asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</form>
</body>
</html>
I am getting below output in emulator but I want my page to shrink and fit in mobile display.
My web page output is:
This output should shrink and fit into mobile.I have used viewport tag to do this but I am not getting the desired output. Please help me to do this task. Is iquery mobile helpful in doing this?
There are many combination you can use, i would suggest below one,
1) use this viewport tag, <meta name="viewport" content = "width =device-width, initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
2) Use a fluid layout, twitter bootstrap is a good library
I have problem with Obout calendar and textbox inside obout grid edit template.
This is the code of my grid :
<obout2:Grid ID="grid1" runat="server" CallbackMode="false" Serialize="true"
ShowHeader="true" PageSize="10"
FolderStyle="~/styles/Grid/black_glass" AutoGenerateColumns="false" EnableRecordHover="true"
AllowAddingRecords="true" RowEditTemplateId="tplRowEdit">
<Columns>
<obout2:Column ID="Column1" DataField="ID_Nal" ReadOnly="true" Visible="false" HeaderText="ID_Nal"
Width="100" runat="server">
<TemplateSettings RowEditTemplateControlId="txtID_Nal" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column2" DataField="ID_Wpl" Visible="false" HeaderText="ID_Wpl"
Width="200" runat="server">
<TemplateSettings RowEditTemplateControlId="txtID_Wpl" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column3" DataField="Nazwa" HeaderText="Typ_Naleznosci" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtTyp" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column4" DataField="KwotaN" HeaderText="Kwota Nalezności" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtKwotaN" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column5" DataField="Termin_platnosci" HeaderText="Termin_platnosci"
Width="150" runat="server">
<TemplateSettings RowEditTemplateControlId="txtTermin" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column7" DataField="Opis" HeaderText="Opis nal." Width="150" runat="server">
<TemplateSettings RowEditTemplateControlId="txtOpis" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column8" DataField="KwotaW" HeaderText="Kwota wpłaty" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtKwotaW" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column9" DataField="DataW" HeaderText="Data wpłaty" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtDataW" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column10" DataField="OpisW" HeaderText="Opis wpłaty" Width="150"
runat="server">
<TemplateSettings RowEditTemplateControlId="txtOpisW" RowEditTemplateControlPropertyName="value" />
</obout2:Column>
<obout2:Column ID="Column11" HeaderText="" Width="200" AllowEdit="true" Align="center"
AllowDelete="true" runat="server" />
</Columns>
<TemplateSettings RowEditTemplateId="tplRowEdit" />
<Templates>
<obout2:GridTemplate runat="server" ID="tplRowEdit">
<Template>
<div style="position: relative;">
<table class="rowEditTable">
<tr>
<td valign="top">
<fieldset style="width: 275px; height: 250px;">
<legend>Ship Information</legend>
<table>
<tr>
<td width="120">
ID Nal:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtID_Nal" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Id Wpl:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtID_Wpl" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Typ:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtTyp" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Kwota:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtKwotaN" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Termin płatności:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtTermin" Width="150" />
</td>
<td>
<obout:Calendar ID="Calendar1" runat="server" DatePickerMode="true" DatePickerImagePath="~/Styles/Calendar/icon2.gif"
StyleFolder="~/Styles/Calendar/default"
TextBoxId="txtTermin" CultureName="pl-PL" DateFormat="dd-MM-yyyy">
</obout:Calendar>
</td>
</tr>
<tr>
<td width="120">
Opis:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtOpis" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Kwota wpłaty:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtKwotaW" Width="150" />
</td>
</tr>
<tr>
<td width="120">
Data wpłaty:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtDataW" Width="150" />
</td>
<td>
<obout:Calendar ID="Calendar2" runat="server" DatePickerMode="true" DatePickerImagePath="~/Styles/Calendar/icon2.gif"
StyleFolder="~/Styles/Calendar/default" CultureName="pl-PL" DateFormat="dd-MM-yyyy"
ShowHourSelector="False" ShowMinuteSelector="False" ShowSecondSelector="False"
TextBoxId="txtDataW">
</obout:Calendar>
</td>
</tr>
<tr>
<td width="120">
Opis wpłaty:
</td>
<td>
<obout1:OboutTextBox runat="server" ID="txtOpisW" Width="150" />
</td>
</tr>
<tr>
<td colspan="2">
<br />
</td>
</tr>
</table> </fieldset> </td>
</tr>
<tr>
<td colspan="2" align="center">
<obout1:OboutButton ID="BtnSaveChanges" runat="server" Text="Save" OnClientClick="return saveChanges('BtnSaveChanges')" />
<obout1:OboutButton ID="BtnCancelChanges" runat="server" Text="Cancel" OnClientClick="return cancelChanges('BtnCancelChanges');" />
</td>
</tr>
</table>
<div class="loading-image-container" id="LoadingIndicator" style="display: none;">
<div class="loading-image">
</div>
</div>
</div>
</Template>
</obout2:GridTemplate>
</Templates>
</obout2:Grid>
When i run the code and click the calendar near "txtTermin" the calendar is displayed,but when i change the date in calendar it was not changed in textbox (txtTermin).
But when I replace
<obout1:OboutTextBox runat="server" ID="txtTermin" Width="150" />
with
<asp:TextBox runat="server" ID="txtTermin" Width="150" />
everything is working OK.
Of course the same problem is with txtDataW.
Please help, why calendar doesn't work with OboutTextBox,but works with standard ASP TextBox ? In this example : http://www.obout.com/grid/grid_commands_row_template.aspx it works (Order Date,Required Date..) with OboutTextBox'es.
My Struts2 application needs the pagination functionality applied to some records, but what I need to customize is the "Last 1 - 2 - 3 Next" appearance and also have the ability to use a combo box for the selection of how many records should be visible(10 - 20 - 30 - 40 -50).
I have tried two way to accomplish this goal:
1) use display tag library, but I'm not able to customize the appearance, because is auto-generated by the library, and I don't how implement the combo box for select how many records should be visible
2) create my own code for accomplish this functionality but is a job too long and not enough time due to the expiry.
My question is: exists some Struts2 library for realize this functionality? Or, is possible to customize the display tag library for the page scroll bar and the records combo box?
I can give insight from struts2 code base there is no functionality as described by you provided by struts2 in itself..
Regarding the Display tag i have not used them much but since they are the part of oprn source i am sure we can customize that one more thing regarding the customization of display tag ask question under display tag you will get better answer at at quick pace
I wrote a custom tld just for the purpose as below and then just use it like this:
Usage:
paginate.tag
1}">
<c:set var="showingPage"
value="${param.pageNumber == null ? 1 : param.pageNumber}" />
<c:url value="${postUrl}" var="previousUrl">
<c:param name="pageNumber" value="${showingPage - 1}" />
<c:param name="perPage" value="${perPage}" />
</c:url>
<c:url value="${postUrl}" var="nextUrl">
<c:param name="pageNumber" value="${showingPage +1}" />
<c:param name="perPage" value="${perPage}" />
</c:url>
<div class="pagination" />
<c:if test="${showingPage > 1}">
<< Previous
</c:if>
<fmt:formatNumber var="endCounter" pattern="0">
<%= totalCount % perPage > 0 ? Math.ceil(totalCount/perPage) + 1 : totalCount/perPage %>
</fmt:formatNumber>
<c:forEach begin="1" end="${endCounter}" var="index">
<c:url value="${postUrl}" var="url">
<c:param name="pageNumber" value="${index}" />
<c:param name="perPage" value="${perPage}" />
</c:url>
${index}
</c:forEach>
<c:if test="${endCounter != showingPage}">
Next >>
</c:if>
</div>
</c:if>
hi you can try struts2 jquery grid here is the code
<%# page contentType="text/html; charset=UTF-8"%>
<%# taglib prefix="s" uri="/struts-tags"%>
<%# taglib prefix="sj" uri="/struts-jquery-tags"%>
<%# taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<sj:div id="resultsDiv">
<body>
<div id="mainframe">
<s:form>
<div id="sucessMsg">
<s:property value="msg" />
</div>
<s:url id="editurl" action="editUser" />
<s:url id="deleteurl" action="deleteUser" />
<script type="text/javascript">
function editLinkFormatter(cellval, options, rowObject, icon, link_class, link_action) {
//alert(rowObject.username);
return "<a href='#' onClick='javascript:openEditDialog(""+cellval+"",""+rowObject.username+"")'><font class='hyperlink'><u>" + rowObject.username + "</u></font></a>";
}
function deleteLinkFormatter(cellval, options, rowObject, icon, link_class, link_action) {
return "<a href='deleteUser?userid="+cellval+"' onClick='javascript: return delete_user()'><font class='hyperlink'><u>Delete</u></font></a>";
//return "Delete";
}
colModal: [
{name: 'userid', formatter: function (cellvalue, options, rowObject) {
return editLinkFormatter(cellvalue, options, rowObject,
'ui-icon-pencil', 'edit-link-class', 'Edit');
}},
{name: 'userid', formatter: function (cellvalue, options, rowObject) {
return deleteLinkFormatter(cellvalue, options, rowObject, icon, link_class, link_action);
}}
];
function openEditDialog(userid,username) {
$("#resultsDiv").load("<s:property value="editurl"/>?userid="+userid+"&username="+username);
}
function delete_user() {
var agree=confirm("Are you sure you want to Delete?");
if (agree){
return true;
}
else{
return false;
}
// $("#edit_Users").dialog('open');
}
function unlockerFormatter(cellval, options, rowObject, icon, link_class, link_action) {
if(rowObject.loginStatus=='Locked'){
return "<a href='unlockuser?userid=" + rowObject.userid + "')'><font class='hyperlink'><u>Locked</u></font></a>";
}
else{
return "UnLocked";
}
/* return "<a href='deleteUser?userid="+cellval+"' onClick='javascript: return deleteUser("+cellval+")'><u>Delete</u></a>"; */
//return "Delete";
}
</script>
<sj:dialog id="edit_Users" title="Edit User" autoOpen="false"
modal="true" width="800" />
<sj:div id="draggable" draggable="true">
<s:url id="remoteurl" action="viewUserstemp" />
<sjg:grid id="gridtable" caption="Users" dataType="json"
href="%{remoteurl}" pager="true" gridModel="gridModel"
rowList="10,15,20,50,100" rowNum="10" rownumbers="true" viewrecords="true"
width="800" navigator="true" navigatorView="false" navigatorDelete="false" navigatorAdd="false" navigatorEdit="false" navigatorSearch="false">
<sjg:gridColumn name="userid" index="userid" title="User Id"
sortable="false" />
<sjg:gridColumn name="userid" index="username" title="User Name"
sortable="true" formatter="editLinkFormatter" />
<sjg:gridColumn name="emailid" index="emailid" title="Email Id"
sortable="true" />
<sjg:gridColumn name="userCreatedDate" index="userCreatedDate"
title="Created Date" sortable="true" />
<sjg:gridColumn name="userModifiedDate" index="userModifiedDate"
title="Modified Date" sortable="true" />
<sjg:gridColumn name="accstatus" index="accstatus"
title="Account Status" sortable="true" />
<sjg:gridColumn name="userid" index="username" title="Delete User"
sortable="true" formatter="deleteLinkFormatter" />
<sjg:gridColumn name="loginStatus" index="loginStatus" title="Unlock User"
sortable="true" formatter="unlockerFormatter" />
</sjg:grid>
<br></br>
<s:submit action="loadUserValues" cssClass="ui-button ui-widget ui-state-default ui-corner-all ui-state-hover" name="button"
id="button" value="New User" />
<br />
</sj:div>
</s:form>
<%--
<td height="25" align="left" valign="middle">
<s:url id="url" action="unlockuser">
<s:param name="userid">
<s:property value="userid" />
</s:param>
</s:url>
<s:set name="type" value="%{loginStatus}" />
<s:if test="%{#type=='Locked'}">
<s:a href="%{url}" title="Click here to Unlock" ><s:property value="loginStatus"/></s:a>
</s:if>
<s:else>
Unlocked
</s:else> --%>
</td>
</div>
</body>
</sj:div>
</html>
I'm working with some nested datalist controls and cannot get the SP parameters for my nested stored procedure to work.
In debug I can see that SqlDataSource2.SelectParameters.Add("Section",oLabel.Text.ToString()); is getting the correct value from the label but when the results display I always get the results for the last parameter added?
I'm guessing I need to clear the parameters in some way each time the nested datalist is bound but if I add code to do that it results in an error that I have not specified the parameters?
My code is below, you'll see that eventually I will have 3 nested datalists inside each other - or that's the plan.
Thanks for any suggestions
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="nhscsharprepeater._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%# Import Namespace="System.Web" %>
<%# Import Namespace="System.Web.UI" %>
<%# Import Namespace="System.Data" %>
<script type="text/C#" runat="server">
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
DataList oList = (DataList)e.Item.FindControl("Datalist2");
Label oLabel = (Label)e.Item.FindControl("lblSection");
DataList oList2 = (DataList)oList.FindControl("Datalist3");
SqlDataSource2.SelectParameters.Clear();
SqlDataSource2.SelectCommand = "report_DistinctSubSections";
SqlDataSource2.SelectParameters.Add("Section",oLabel.Text.ToString());
oList.DataBind();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:productfolioConnectionString %>"
SelectCommand="report_DistinctSection" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:productfolioConnectionString %>"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="Section" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:productfolioConnectionString %>"
SelectCommand="report_getReports" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="SubSection" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" RepeatColumns="2" RepeatDirection="Horizontal" OnItemDataBound="DataList1_ItemDataBound">
<ItemTemplate>
<asp:Label Runat="server" text='<%# DataBinder.Eval(Container.DataItem, "Section") %>' ID="lblSection">
</asp:Label>
<br />
<asp:datalist id="Datalist2" runat="server" DataSourceID="SqlDataSource2">
<ItemTemplate>
<asp:Label Runat="server" text='<%# DataBinder.Eval(Container.DataItem, "SubSection") %>' ID="lblSection">
</asp:Label>
<br />
<asp:datalist id="Datalist3" runat="server" DataSourceID="SqlDataSource3">
<ItemTemplate>
<!--<asp:Label Runat="server" text='<%# DataBinder.Eval(Container.DataItem, "Report") %>' ID="lblSection">
</asp:Label>-->
</ItemTemplate>
</asp:datalist>
</ItemTemplate>
</asp:datalist>
</ItemTemplate>
</asp:DataList>
</div>
</form>
</body>
</html>
One might guess that calling Clear on SqlDataSource2.SelectParameters before calling Add might do the trick.