Hi,
I selected a GridView with options (enable paging and sorting) but when I start the page I can’t see the hole table, and I can’t see the paging possibility (maybe a problem of CSS)
Here’s my project : https://fgt.bo/A0Z
I start from Equipements/Ajout_Equipement_HS.aspx
Can you please help resolve the problem ?
hi
If you have enabled the paging as true,
check the paging size…also check the grid view css properties…so that you can see wether the paging is hidden because its larger than your div
I have
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None"
Height="103px"
style="text-align: center; margin-top: 0px; font-weight: 700; font-size: small; margin-left: 0px;"
Width="785px">
Should I change the Height or the Width ?
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None"
style="text-align: center; margin-right:auto;margin-left:auto;width:80%;height:80%" >
There is no need for height and width secifically…declare that also in style…. or ite better to use an external css
Can you please check the Site.css, I don’t know what to do :
My website is here : https://fgt.bo/A0Z
you can open the login.aspx and login as salim/manager then see Equipements_HS.aspx it’s larger than the page
Can you please help me, I can’t see my Textboxs and labels !!!
hi
The link you shared is not loading here….
The problem is because you might have dragged and pulled the text box and other controls so they are not uniform and outside div…please share your css file…
Maybe a probel of panel ? Should drop my Gridview into the panel :
Here is css code :
/* DEFAULTS
----------------------------------------------------------*/
body
{
background-color:ThreeDFace;
font-size: .80em;
font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
margin: 0px;
padding: 0px;
color: #696969;
}
a:link, a:visited
{
color: #034af3;
};
a:hover
{
color: #1d60ff;
text-decoration: none;
}
a:active
{
color: #034af3;
}
p
{
margin-bottom: 10px;
line-height: 1.6em;
width: 939px;
height: 128px;
margin-top: 89px;
}
/* HEADINGS
----------------------------------------------------------*/
h1, h2, h3, h4, h5, h6
{
font-size: 1.5em;
color:#666666;
font-variant: small-caps;
text-transform: none;
font-weight: 200;
margin-bottom: 0px;
}
h1
{
font-size: 1.6em;
padding-bottom: 0px;
margin-bottom: 0px;
}
h2
{
font-size: 1.5em;
font-weight: 600;
}
h3
{
font-size: 1.2em;
}
h4
{
font-size: 1.1em;
}
h5, h6
{
font-size: 1em;
}
/* this rule styles <h1> and <h2> tags that are the
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
margin-top: 0px;
}
/* PRIMARY LAYOUT ELEMENTS
----------------------------------------------------------*/
.page
{
width: 100%;
background-color: ThreeDFace;
margin: 0px auto 0px auto;
border: 1px solid #496077;
}
.header
{
position: relative;
margin: 0px;
padding: 0px;
background-image : "~/Images/onda_logo.bmp";
width: 100%;
top: 0px;
left: 0px;
height: 140px;
}
.header h1
{
border-style: none;
border-color: inherit;
border-width: medium;
font-weight: 700;
margin: 4px 0px 0px 0px;
padding: 0px 0px 0px 20px;
color: #f9f9f9;
line-height: 2em;
font-size: 2em;
height: 53px;
width: 645px;
}
.main
{
padding: 0px 12px;
margin: 12px 8px 8px 8px;
min-height: 420px;
}
.leftCol
{
padding: 6px 0px;
margin: 12px 8px 8px 8px;
width: 200px;
min-height: 200px;
}
.footer
{
color: #4e5766;
padding: 0px 0px 0px 0px;
margin: 0px auto;
text-align: center;
line-height: normal;
}
/* TAB MENU
----------------------------------------------------------*/
div.hideSkiplink
{
background-color:#3a4f63;
width:100%;
}
div.menu
{
padding: 4px 0px 4px 8px;
}
div.menu ul
{
list-style: none;
margin: 0px;
padding: 0px;
width: auto;
}
div.menu ul li a, div.menu ul li a:visited
{
background-color: #465c71;
border: 1px #4e667d solid;
color: #dde4ec;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
}
div.menu ul li a:hover
{
background-color: #bfcbd6;
color: #465c71;
text-decoration: none;
}
div.menu ul li a:active
{
background-color: #465c71;
color: #cfdbe6;
text-decoration: none;
}
/* FORM ELEMENTS
----------------------------------------------------------*/
fieldset
{
margin: 1em 0px;
padding: 1em;
border: 1px solid #ccc;
}
fieldset p
{
margin: 2px 12px 10px 10px;
}
fieldset.login label, fieldset.register label, fieldset.changePassword label
{
display: block;
}
fieldset label.inline
{
display: inline;
}
legend
{
font-size: 1.1em;
font-weight: 600;
padding: 2px 4px 8px 4px;
}
input.textEntry
{
width: 320px;
border: 1px solid #ccc;
}
input.passwordEntry
{
width: 320px;
border: 1px solid #ccc;
}
div.accountInfo
{
width: 42%;
}
/* MISC
----------------------------------------------------------*/
.clear
{
clear: both;
}
.title
{
display: block;
float: left;
text-align: left;
width: auto;
}
.loginDisplay
{
font-size: 1.1em;
display: block;
text-align: right;
padding: 10px;
color: White;
}
.loginDisplay a:link
{
color: white;
}
.loginDisplay a:visited
{
color: white;
}
.loginDisplay a:hover
{
color: white;
}
.failureNotification
{
font-size: 1.2em;
color: Red;
}
.bold
{
font-weight: bold;
}
.submitButton
{
text-align: right;
padding-right: 10px;
}
And here's my code project:
<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false"
CodeFile="Equipements_HS.aspx.vb" Inherits="_Default" %>
<%@ Import Namespace="System.Web.Security" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Bienvenue <asp:Label ID="LabelUtilisateurConnecté" runat="server" Text=""></asp:Label>
</h2>
<asp:Panel ID="Panel2" runat="server" Height="41px" Width="937px">
<br />
<br />
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="4"
DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None"
Height="86px"
style="text-align: center; margin-top: 0px; font-weight: 700; font-size: small; margin-left: 0px;"
Width="785px">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="Division" HeaderText="Division"
SortExpression="Division" />
<asp:BoundField DataField="Equipement_HS" HeaderText="Equipement_HS"
SortExpression="Equipement_HS" />
<asp:BoundField DataField="Date_HS" HeaderText="Date_HS"
SortExpression="Date_HS" />
<asp:BoundField DataField="Utilisateur_déclarant_panne"
HeaderText="Utilisateur_déclarant_panne"
SortExpression="Utilisateur_déclarant_panne" />
<asp:BoundField DataField="Problème" HeaderText="Problème"
SortExpression="Problème" />
<asp:BoundField DataField="Date_intervention_finale"
HeaderText="Date_intervention_finale"
SortExpression="Date_intervention_finale" />
<asp:BoundField DataField="Utilisateur_intérvenant"
HeaderText="Utilisateur_intérvenant" SortExpression="Utilisateur_intérvenant" />
<asp:BoundField DataField="Remarques" HeaderText="Remarques"
SortExpression="Remarques" />
</Columns>
<EditRowStyle BackColor="#7C6F57" />
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#E3EAEB" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F8FAFA" />
<SortedAscendingHeaderStyle BackColor="#246B61" />
<SortedDescendingCellStyle BackColor="#D4DFE1" />
<SortedDescendingHeaderStyle BackColor="#15524A" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [Equipements_HS]"
DeleteCommand="DELETE FROM [Equipements_HS] WHERE [Id_équipement_HS] = @Id_équipement_HS"
InsertCommand="INSERT INTO [Equipements_HS] ([Equipement], [Date_HS], [Utilisateur], [Remarques_panne], [Résolution]) VALUES (@Equipement, @Date_HS, @Utilisateur, @Remarques_panne, @Résolution)"
UpdateCommand="UPDATE [Equipements_HS] SET [Equipement] = @Equipement, [Date_HS] = @Date_HS, [Utilisateur] = @Utilisateur, [Remarques_panne] = @Remarques_panne, [Résolution] = @Résolution WHERE [Id_équipement_HS] = @Id_équipement_HS">
<DeleteParameters>
<asp:Parameter Name="Id_équipement_HS" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBoxEquipementHS" PropertyName="Text" Name="Equipement" Type="String" />
<asp:ControlParameter ControlID="TextBoxDateHS" PropertyName="Text" Name="Date_HS" Type="DateTime" />
<asp:ControlParameter ControlID="LabelUtilisateurConnecté" PropertyName="Text" Name="Utilisateur" Type="String" />
<asp:ControlParameter ControlID="TextBoxProblème" PropertyName="Text" Name="Remarques_panne" Type="String" />
<asp:Parameter Name="Résolution" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Equipement" Type="String" />
<asp:Parameter Name="Date_HS" Type="DateTime" />
<asp:Parameter Name="Utilisateur" Type="String" />
<asp:Parameter Name="Remarques_panne" Type="String" />
<asp:Parameter Name="Résolution" Type="String" />
<asp:Parameter Name="Id_équipement_HS" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Panel>
<p>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Division], [Equipement_HS], [Date_HS], [Utilisateur_déclarant_panne], [Problème], [Date_intervention_finale], [Utilisateur_intérvenant], [Remarques] FROM [Vue_équipements_HS] ORDER BY [Date_HS] DESC"></asp:SqlDataSource>
<asp:Panel ID="Panel1" runat="server" Height="28px">
</asp:Panel>
</p>
<p>
</p>
</asp:Content>
I’m using the master page (the project is from the template website given by default in Visal Studio 2010)
hi
there is no need for a pannel….put it outside the pannel..also check the style for the master page..may be its cause of the style the items outside the content place holder are hidden…
Here’s my master page:
<%@ Master Language="VB" AutoEventWireup="false" CodeFile="Site.Master.vb" Inherits="Site" %>
<!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">
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style1
{
text-align: center;
}
.style3
{
font-size: large;
}
.menu
{
font-size: large;
}
.menu
{
font-size: x-large;
}
.menu
{
font-size: x-large;
}
.menu
{
font-size: large;
}
</style>
</head>
<body>
<form runat="server">
<div class="page">
<div class="header">
<div class="title">
<h1 class="style3">
<asp:Image ID="Image1" runat="server" Height="110px"
ImageUrl="~/Images/onda_logo.bmp" style="margin-top: 0px" Width="640px" />
</h1>
<h1 class="style1">
</h1>
</div>
<div class="loginDisplay">
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>
</div>
<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Acceuil">
<asp:MenuItem NavigateUrl="Acceuil/Contact.aspx" Text="Utilisateur"/>
<asp:MenuItem NavigateUrl="Acceuil/Contact.aspx" Text="Documentation"/>
<asp:MenuItem NavigateUrl="Acceuil/Contact.aspx" Text="Contact"/>
<asp:MenuItem NavigateUrl="Acceuil/Contact.aspx" Text="Gestion des utilisateurs"/>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Equipes">
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Enregistrer une entrée"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Planning prévu "/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Liste des équipes"/>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="Equipements/Equipements_HS.aspx" Text="Equipements">
<asp:MenuItem NavigateUrl="Equipements/Ajout_équipement_HS.aspx" Text="Ajouter un équipement hors service"/>
<asp:MenuItem NavigateUrl="Equipements/Ajout_intervention.aspx" Text="Ajouter une intervention"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Statistiques"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Liste des équipements"/>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Lignes">
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Ajouter une ligne hors service"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Ajouter une intervention"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Statistiques"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Liste des lignes"/>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Interventions">
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Interventions sur les équipements"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Interventions sur les lignes"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Instructions"/>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Planning de la maintenace préventive"/>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Trafic AFTN">
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Enregistrer un trafic"/>
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Missions à l'extérieur">
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Enregistrer une mission"/>
</asp:MenuItem>
</Items>
</asp:Menu>
</div>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
</div>
</form>
<p>
</p>
</body>
</html>
Hi, have you removed the Panel, what’t the result after removing it?
No result I still can’t see my hall datagridview