I am getting problem in alignment of element that is in FooterTemplate of GridView.
Anyone suggest me how to do it.The Code is:
<asp:GridView ID="gvComment" runat="server" AutoGenerateColumns="false"
OnRowDataBound="gvComment_RowDataBound" OnRowCreated="gvComment_RowCreated" Width="100%" ShowHeader="false" BorderWidth="0px" ShowFooter="true">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%" >
<tr>
<td valign="middle" align="left" style="width:10%"><img id="imgUser" src="" alt="" title="" runat="server" /></td>
<td align="left" valign="top">
comment comment
<asp:Label ID="lblNameComments" runat="server" Visible="false" ></asp:Label>
</td>
</tr>
<tr><td colspan="2" style="height:7px;"></td></tr>
<tr>
<td colspan="2" style="padding-top:10px;background-image:url(../Images/dotted_line.jpg);background-repeat:repeat-x;background-position:center;"></td>
</tr>
<tr><td colspan="2" style="height:7px;"></td></tr>
</table>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<FooterTemplate >
<table border="0" cellpadding="0" cellspacing="0" width="100%" >
<tr>
<td align="left">
Footer Text
Footer Text
Footer Text
</td>
</tr>
</table>
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
I have set align property of td left but it doesn't work.Page output shown in image.
It does align left.
Please put complete code (css included) here:
http://jsfiddle.net/T364r/
Related
I am unable to see the radio button list yes or NO in my screen I am getting the values from XML file.
Following code in aspx page:
<asp:Panel ID="pnlAction" runat="server" Width="100%" Visible="false">
<table cellpadding="0" cellspacing="0" border="0" width="99%">
<tr style="height: 20px;">
<td style="width: 25px;">
<hr />
</td>
<td class="secHeading frmlblBold"" style="width: 80px;" align="center">
Action
</td>
<td>
<hr />
</td>
</tr>
</table>
<table style="font-weight:normal" width="100%" border="0" cellpadding="2" cellspacing="2">
<tr>
<td style="width:250px;"></td>
<td style="width:350px;"></td>
<td style="width:250px;"></td>
<td style="width:350px;"></td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Action </td>
<td><asp:DropDownList ID="ddlAction" runat="server" CssClass="DropDown" DataSourceID="dsAction" DataValueField="CODE" DataTextField="CDDesc" AutoPostBack = "False" Width="342px"></asp:DropDownList></td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Service Agreement Clause </td>
<td style="vertical-align:top" style="width: 350px;">
<%-- <fieldset id="fldSLA" runat="server" style="width: 280px;">--%>
<asp:RadioButtonList ID="radSLA" runat="server" RepeatDirection="Horizontal" DataValueField="SLAID" DataTextField="SLADESC" DataSourceID="dsSLA" visible = "true">
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="rfvSLA" runat="server" ControlToValidate="radSLA" ErrorMessage="Please select if service agreement is applicable or not."
Enabled="true" Display="none"></asp:RequiredFieldValidator>
<%-- </fieldset>--%>
</td>
</tr>
<tr>
<td class="frmlblBold" style="text-align:right;vertical-align:top">Comments </td>
<td style="vertical-align:top">
<asp:TextBox runat="server" ID="txtActionComments" MaxLength="500" TextMode="MultiLine" width="95%" Rows="5" /> </td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" CssClass="btnOther" />
</tr>
</asp:Panel>
<asp:XmlDataSource ID="dsSLA" runat="server" EnableCaching="false" DataFile="~/XML/VisaTracking.xml"
XPath="BVILetter/SLA/ITEM" />
Code in .cs file:
if (!IsPostBack)
{
base.PageLoad();
GetReqPndActTknByMe(base.LogShortID);
radSLA.DataBind();
radSLA.SelectedValue = "Yes";
BindDataToDropdownListAction();
}
I am able to see the row count of radSLA.DataBind(); as '2'
My XML code:
<BVILetter>
<SLA>
<ITEM SLAID ="Yes" SLADESC ="Yes" />
<ITEM SLAID ="No" SLADESC ="No" />
</SLA>
</BVILetter>
But I am not able to see the radio buttons in my screen:
Please help me.
Please Check the Binding function clearly. If binding not happened properly then RadioBottonList does not appear.RadioBottonList apear only when when listItem bind properly
I have gridview with itemtemplate columns and it generates extra tr in rendered html
i have set CellPadding="0" CellSpacing="0" and AutoGenerateColumns="false", but is doesn't help..
here is my gridview:
<asp:GridView ID="GridView1" GridLines="None" runat="server"
CellPadding="0" CellSpacing="0" ShowFooter="true"
AutoGenerateColumns="false" AllowPaging="true" OnPageIndexChanging="Grid_PageIndexChanging">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<table cellpadding="0" cellspacing="0" border="0" width="100%"
class="table_sabcho">
</HeaderTemplate>
<ItemTemplate>
<tr id="sds">
<td><a href="show_item.aspx?id=<%# DataBinder.Eval (Container.DataItem, "id") %>">
<%# DataBinder.Eval(Container.DataItem, "number")%></a>
</td>
<td><%# DataBinder.Eval(Container.DataItem, "date","{0 :dd/MM/yyyy}")%>
</td>
<td><%# DataBinder.Eval(Container.DataItem, "Category")%></td>
<td><%# DataBinder.Eval(Container.DataItem, "type_name")%>
</td>
<td style="padding-left: 0;"><%# getDoc((DataBinder.Eval(Container.DataItem, "id")).ToString())%>
</td>
</tr>
</ItemTemplate>
<FooterTemplate></table> </FooterTemplate>
</asp:TemplateField>
</Columns>
here is how i databind grid:
protected void GetLastNewsGrid()
{
String query = "Select * from sample_view order by id desc";
DataSet lawdataset = SqlHelper.ExecuteDataset(connString, CommandType.Text, query);
GridView1.DataSource = lawdataset;
GridView1.DataBind();
}
here is rendered html :
<tr id="it is empty.." >
<td></td>
</tr>
<tr id="sds" >
<td> 4965/2/12 </td>
<td>24.12.2012 </td>
<td></td>
<td>dep </td>
<td style="padding-left: 0;"><a class="pdf_box" href="common/get_doc.aspx?docID=6900" ></a></td>
</tr>
i am using model popup in asp.net on this linkbutton
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="addProduct-disable" Enabled ="false" Text="Assign Filter Criteria" CausesValidation="true" ></asp:LinkButton>
when i click a button in popup the event is getting fired but the asp panel and label are not getting displayed
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="3" class="style3" align="center">
Assign Filtering Criteria
</td>
</tr>
<tr>
<td colspan="3">
<asp:Label ID="lblSuccess" runat="server" Text="" ></asp:Label>
</td>
</tr>
<tr>
<td class="logText" width="30%">
Filter:
<asp:ImageButton ID="imgFilter" runat="server" ImageUrl="../images/helpIcon.png"
border="0" CausesValidation="false" OnClientClick="return showHelp('ctl00_ContentPlaceHolder1_pnlFilterHelp');" />
<cc1:ModalPopupExtender ID="mdlFilter" runat="server" TargetControlID="imgFilter"
PopupControlID="pnlFilterHelp" DropShadow="false" CancelControlID="lnkFilterCancel"
X="410" Y="200" />
<asp:Panel ID="pnlFilterHelp" runat="server" Height="70px" Width="170px" Style="display: none;">
<asp:Panel ID="pnlFilterOuter" runat="server" CssClass="modalPopup2" Height="100px"
Width="180px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="#FFFCF9">
<table cellpadding="0" cellspacing="0" width="90%">
<tr>
<td align="center" valign="middle" style="padding-top: 15px; padding-left: 5px;">
<table cellpadding="0" align="center" cellspacing="0" width="100%" height="40px">
<tr>
<td class="style8">
Set Filter Criteria so that customer can easily search product.
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td style="padding-left: 20px;">
<asp:LinkButton ID="lnkFilterCancel" runat="server" Text="" CssClass="gridPagerlink"
ForeColor="Black">Close <b>X</b></asp:LinkButton>
</td>
</tr>
</table>
</asp:Panel>
</asp:Panel>
</td>
<td width="4px">
</td>
<td class="logBox">
<asp:UpdatePanel ID="filter" runat="server">
<ContentTemplate>
<asp:DropDownList ID="drpFilter" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drpFilter_SelectedIndexChanged"
Width="150px">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td class="logText">
Filter Option:
<asp:ImageButton ID="imgFilterOption" runat="server" ImageUrl="../images/helpIcon.png"
border="0" CausesValidation="false" OnClientClick="return showHelp('ctl00_ContentPlaceHolder1_pnlFilterOption');" />
<cc1:ModalPopupExtender ID="mdlFilterOption" runat="server" TargetControlID="imgFilterOption"
PopupControlID="pnlFilterOption" DropShadow="false" CancelControlID="lnkFilterOptionCancel"
X="410" Y="220" />
<asp:Panel ID="pnlFilterOption" runat="server" Height="70px" Width="170px" Style="display: none;">
<asp:Panel ID="pnlFilterOptionOuter" runat="server" CssClass="modalPopup2" Height="300px"
Width="580px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="#FFFCF9">
<table cellpadding="0" cellspacing="0" width="90%">
<tr>
<td align="center" valign="middle" style="padding-top: 15px; padding-left: 5px;">
<table cellpadding="0" align="center" cellspacing="0" width="100%" height="40px">
<tr>
<td class="style8">
Set Filter Criteria Option so that customer can easily search product.
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td style="padding-left: 20px;">
<asp:LinkButton ID="lnkFilterOptionCancel" runat="server" Text="" CssClass="gridPagerlink"
ForeColor="Black">Close <b>X</b></asp:LinkButton>
</td>
</tr>
</table>
</asp:Panel>
</asp:Panel>
</td>
<td width="4px">
</td>
<td class="logBox">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="drpFilterOption" runat="server" Width="150px" Enabled="false">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td class="logText">
</td>
<td width="4px">
</td>
<td class="logBox">
<asp:UpdatePanel ID="cancel" runat="server">
<ContentTemplate>
<asp:Button ID="btnAdd" runat="server" Style="font-weight: 700; text-align: right"
Text="Add" CssClass="Login-btn" OnClick="btnAdd_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</td> </tr>
<tr>
<td>
</td>
<td colspan="2">
</td>
</tr>
<tr>
<td align="center" colspan="3">
<asp:Panel ID="pnlAddFilter" runat="server" style="display:none">
<table id="list">
</table>
<div id="pager" style="text-align: center;">
</div>
<br />
</asp:Panel>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
</tr>
</table>
event is
protected void btnAdd_Click(object sender, EventArgs e)
{
pnlAddFilter.Style.Add("display", "block");
//pnlAddFilter.Visible = true;
DataTable dtFilter = new DataTable();
dtFilter.Columns.Add("FOId");
dtFilter.Columns.Add("Filtername");
dtFilter.Columns.Add("FilterOption");
DataRow drFilter;
if (Session["Filter"] != null)
{
dtFilter = (DataTable)Session["Filter"];
}
drFilter = dtFilter.NewRow();
drFilter["FOId"] = drpFilterOption.SelectedValue;
drFilter["Filtername"] = drpFilter.SelectedItem.Text;
drFilter["FilterOption"] = drpFilterOption.SelectedItem.Text;
dtFilter.Rows.Add(drFilter);
Session["Filter"] = dtFilter;
btnAdd.Enabled = false;
if (Session["Filter"] == null)
{
// pnlAddFilter.Visible = false;
pnlAddFilter.Style.Add("display", "none");
}
else
{
pnlAddFilter.Style.Add("display", "block");
// pnlAddFilter.Visible = true;
}
lblSuccess.Visible = true;
lblSuccess.Text = AppHardcodeValue.strAddFilterProduct;
}
In my experience, the modal popup doesn't support dynamically rendered data very well. I'm thinking you probably need to put your modal content inside of an update panel in order to be able to use the server side code to update the label.
i want to reduce the spacing inside my web page:
The problem is the buttons below "back" and "next" is not visible without scrolling down
I have posted the code below:
<asp:View runat="server" ID="view_1">
<asp:ScriptManager ID="scrMgr" runat="server">
</asp:ScriptManager>
<h1 class="blue" style="margin-bottom:0px;">
<asp:Label ID="lbl_viewTitle1" runat="server" Text="Label"></asp:Label>
</h1>
<div style="margin:0px; padding:0px; border:none; clear:both;">
<table border="0">
<tr>
<td>
<table border="1" style="border-color: Green; border-width: thin;">
<tr>
<td valign="top" id="tdReadableContent" runat="server">
<div style="height: 167px; width:450px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="blue" style="height:16px!important;" colspan="3"><b>Your Current Settings</b></td>
</tr>
<tr style="width:10px"><td colspan="3"></td></tr>
<tr id="trUserDetail_read" runat="server">
<td class="tabRow" valign="baseline">
<asp:Label ID="lbl_view1_userID_Read" runat="server" Text="User ID"></asp:Label>
</td>
<td>
<asp:TextBox ID="txt_view1_userID_Read" ReadOnly="true" runat="server" AutoPostBack="true"
CssClass="text_box_gray"></asp:TextBox><div class="smallText" nowrap>
<%--(This would be the ID you would normally log on with.)--%></div>
</td>
<td> </td>
</tr>
<tr>
<td width="150" class="tabRow">
<asp:Label ID="lbl_panview3_label2_read" runat="server" Text="Store Number "></asp:Label>
</td>
<td>
<asp:TextBox ID="txt_panview3_input2_read" CssClass="text_box_gray" ReadOnly="true" runat="server" MaxLength="4"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr>
<td class="tabRow">
<asp:Label ID="lbl_view1_surname_read" runat="server" Text="Surname"></asp:Label>
</td>
<td>
<asp:TextBox ID="txt_view1_surname_read" ReadOnly="true" CssClass="text_box_gray" runat="server"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr id="trFirstName_Read" runat="server">
<td width="150" class="tabRow">
<asp:Label ID="lbl_view1_firstName_Read" runat="server" Text="First Name"></asp:Label>
</td>
<td width="200">
<asp:TextBox ID="txt_view1_firstname_Read" ReadOnly="true" runat="server" CssClass="text_box_gray"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr>
<td></td>
<td>
<%--<asp:Label ID="Label1" CssClass="errorText" runat="server"></asp:Label>--%>
</td>
</tr>
<tr>
<td class="tabRow">
<%--<asp:Label ID="Label2" runat="server" Text="Employee Number "></asp:Label>--%>
</td>
<td width="200">
<%--<asp:TextBox ID="TextBox1" runat="server"
CssClass="text_box_3" MaxLength="10"></asp:TextBox>--%>
</td>
</tr>
</table>
</div>
<asp:Label runat="server" ID="label11"></asp:Label>
<hr class="hrRequestorForm" />
<div id="divRoleDepartment_ReadOnly" runat="server" style="margin-left:20px; height:390px; overflow:auto;" class="tabel1Parent">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<asp:Panel ID="panelStore_Read" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
<asp:GridView ID="gvRoleDepartment_ReadOnly" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkRole_Read" runat="server" Enabled="false" />
<input type="hidden" id="hdRoleCode_Read" value="<%#Bind('ddl_code') %>" runat="server" />
<input type="hidden" id='hdDepCode_Read' value="<%#Bind('dep_code') %>" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ddl_item" HeaderText="Role" ItemStyle-CssClass="roleColumn2" />
<asp:BoundField DataField="dep_name" HeaderText="Department" ItemStyle-CssClass="departmentColumn" />
</Columns>
<EmptyDataTemplate>
<div class="tabel1Parent">
<table border='0' cellpadding='0' cellspacing='0' style='border-color: green; border-width: thin;
width: 390px; border-left: #9787b1 solid 1px; border-top: #9787b1 solid 1px;'>
<tr>
<td class='roleColumn'>
<b>Role</b>
</td>
<td class='departmentColumn'>
<b>Department</b>
</td>
</tr>
</table>
</div>
</EmptyDataTemplate>
</asp:GridView>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
</td>
<td>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</div>
</td>
<td valign="top" >
<div style="height:160px; width:450px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="blue" style="height:16px!important;" colspan="3"><b>
<asp:Label ID="lblNewSettings" runat='server' Text="Your New Settings"></asp:Label>
</b></td>
</tr>
<tr id="trUserDetail" runat="server">
<td class="tabRow" valign="baseline">
<asp:Label ID="lbl_view1_userID" runat="server" Text="User ID "></asp:Label>
</td>
<td class="textFieldColumn">
<asp:TextBox ID="txtUserID" TabIndex="1" text="Enter User id.."
runat="server" AutoPostBack="true"
CssClass="text_box_highlight"
onfocus="defaultStyle();"
onkeypress="ChangeUserIdBackground();"
MaxLength ="50"></asp:TextBox><span id="starUserId" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvUserID" runat="server" ControlToValidate="txtUserID"
ErrorMessage=" Required field" ValidationGroup="Form2"></asp:RequiredFieldValidator><div class="smallText" nowrap>
(This would be the ID you would normally log on with.)</div></td>
</tr>
<tr>
<td colspan="2" style="padding-left:135px">
<asp:Label ID="lblUserExists" CssClass="errorText" runat="server"></asp:Label>
<asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server"
ControlToValidate="txt_panview3_input2" ErrorMessage="Store should be a number"
ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td width="150" class="tabRow">
<asp:Label ID="lbl_panview3_label2" runat="server" Text="Store Number "></asp:Label>
</td>
<td>
<asp:TextBox ID="txt_panview3_input2" runat="server"
MaxLength="4" CssClass="text_box_3">0000</asp:TextBox>
<span id="starStoreNumber" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvStoreNumber" runat="server"
ControlToValidate="txt_panview3_input2" ErrorMessage=" Required field"
ValidationGroup="Form2" ></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="tabRow">
<asp:Label ID="lbl_view1_surname" runat="server" Text="Surname "></asp:Label>
</td>
<td >
<asp:TextBox ID="txt_view1_surname" runat="server"
CssClass="text_box_3"
MaxLength ="50"></asp:TextBox>
<span id="starSurName" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvSurName" runat="server" ControlToValidate="txt_view1_surname"
ErrorMessage=" Required field" ValidationGroup="Form2"></asp:RequiredFieldValidator>
</td>
</tr>
<tr id="trFirstName" runat="server">
<td width="150" class="tabRow">
<asp:Label ID="lbl_view1_firstName" runat="server" Text="First Name"></asp:Label>
</td>
<td >
<asp:TextBox ID="txt_view1_firstname" runat="server"
CssClass="text_box_3"
MaxLength ="50"></asp:TextBox>
<span id="starFirstName" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txt_view1_firstname"
ErrorMessage=" Required field" ValidationGroup="Form2"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="tabRow">
<asp:Label ID="lblEmployeeNumber" runat="server" Text="Employee Number "></asp:Label>
</td>
<td width="280">
<asp:TextBox ID="txtEmployeeNumber" runat="server"
CssClass="text_box_3" MaxLength="6"></asp:TextBox>
<span id="starEmployeeNumber" runat="server" style="color:Red"> *</span>
<asp:RequiredFieldValidator ID="rfvEmplyeeNumber" runat="server" ControlToValidate="txtEmployeeNumber"
ErrorMessage="Required field" ValidationGroup="Form2"></asp:RequiredFieldValidator>
</td>
<td>
<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server"
ControlToValidate="txtEmployeeNumber" ErrorMessage="Enter a numeric value"
ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
</td>
</tr>
</table>
<b><asp:Label ID="lblCaption2" runat="server" Text="Note: All fields are mandatory" ForeColor="Red"></asp:Label></b>
</div>
<hr class="hrRequestorForm" />
<div style="padding-left:20px;" id="divRoleDepartment" runat="server">
<div class="tabel1Parent">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:Panel ID="panelStore" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
<asp:GridView ID="gvRoleDepartment" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="chkRole" runat="server" />
<input id="hdRoleCode" runat="server" type="hidden"
value="<%#Bind('ddl_code') %>" />
<input id="hdDepCode" runat="server" type="hidden"
value="<%#Bind('dep_code') %>" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField ControlStyle-CssClass="roleColumn" ControlStyle-Width="300px"
DataField="ddl_item" HeaderText="Role" ItemStyle-CssClass="roleColumn" />
<asp:BoundField ControlStyle-CssClass="departmentColumn"
ControlStyle-Width="120px" DataField="dep_name" HeaderText="Department"
ItemStyle-CssClass="departmentColumn" />
</Columns>
</asp:GridView>
<span ID="lbl_chkBx_store_workunit" class="errorText"></span>
</td>
<td>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</div>
<br />
<div>
<table>
<tr>
<td>
<asp:Label ID="lblException" runat="server" CssClass="errorText"></asp:Label>
</td>
</tr>
</table>
</div>
<br />
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<br />
<div>
<table>
<tr>
<td>
<asp:Button ID="btn_view1_back" runat="server" Text="Back" CausesValidation="False"
ValidationGroup="Form2" />
<asp:Button ID="btn_View1_Next" runat="server" CausesValidation="true" Text="Next"
ValidationGroup="Form2" OnClientClick="return check_sel();" UseSubmitBehavior="True" />
<%
'mahesh code
'replaced OnClientClick="return ValidateDropDown(); with OnClientClick="return check_sel() "
%>
</td>
</tr>
</table>
</div>
<br />
</td>
</tr>
</table>
</div>
</asp:View>
Please help #!
You say your problem is that the buttons are not into view. You can scroll your control into view by using this technique. Or you can load the page on my screen, I have a bigger monitor.
What I'm trying to say: if it's visible on your screen after redesign, anybody with a smaller screen or a resized browser window still won't see it.
If you want to-the-point help on your HTML design, I suggest you upload a trimmed down example of your problem that we can copy and paste to test (or show an online link of your current page).
Lose the tables, or at the very least, remove the unnecessary <div> and <br> tags.
Another option, provided you do not have to support old versions of Internet Explorer, is to use position: fixed to "stick" your buttons to the bottom of the viewable window.
<div style="position: fixed; bottom: 0px;">
<asp:Button ID="btn_view1_back" ... />
<asp:Button ID="btn_view1_next" ... />
</div>
I am creating a list of data using Repeater Control. Some of the rows might have other rows that should be toggled using the main row's clickable image.
Here, is the HTML part
<table cellpadding="2" cellspacing="0" width="100%">
<asp:Repeater ID="repeatLockers" runat="Server">
<HeaderTemplate>
<tr>
<td> </td>
<td>A</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr id="trItem" class="SomeParentClass" runat="server">
<td>
<img id="imgToggleHomeInfo" runat="server" alt="show/hide repetitves" src="icon_plus.gif"
style="cursor: pointer" />
</td>
<td>
<asp:Label ID="lbl" runat="server"></asp:Label>
</td>
</tr>
<tr id="trAddOnFee" runat="server" class="SomeClass" style="display: none;">
<td colspan="2">
<table cellpadding="4" cellspacing="2" width="100%">
<tr>
<td class="DgHeader">A</td>
<td class="DgHeader">B</td>
</tr>
<asp:Repeater ID="repeatRepetitives" runat="server">
<ItemTemplate>
<tr>
<td>
<asp:Label ID="lblA" runat="server"></asp:Label>
</td>
<td align="right">
<asp:Label ID="lblB" runat="server"></asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
How could I toggle the Rows with class as "SomeClass" inside on click of imgToggleHomeInfo" image on its parent row using Jquery?
I'd find the parent row of the image then toggle it's next sibling.
$(document).ready( function() {
$("[id$='imageToggleHomeInfo']").click( function() {
$(this).closest('tr').next().toggle();
});
})