473,486 Members | 2,401 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GridView and PagerStyle problem

Hello there,

I try to define the properties font-size and font-bold of the pager of a
gridview using the pagerstyle, but the settings are not appleyd at run time.

What could be the reason for this?
I am very appreciated for your help.
Kamen

Here is the ASPX-code:

<asp:GridView ID="gvMailingPersons" style="Z-INDEX: 106;
LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server" BorderColor="#999999"
BorderStyle="NotSet" BackColor="White" CellPadding="3" GridLines="Vertical"
AutoGenerateColumns="False" DataSource="<%# DS_MailingPersons %>"
Height="8px" Width="990px" CssClass="grid" AllowSorting="true"
AllowPaging="true" PageSize="50" PagerSettings-Position=Bottom
DataKeyNames="KontaktNr">
<SelectedRowStyle Font-Bold="True"></SelectedRowStyle>
<AlternatingRowStyle
CssClass="grid_AlternatingItem"></AlternatingRowStyle>
<RowStyle CssClass="grid_Item"></RowStyle>
<HeaderStyle Wrap="False" ForeColor="White" BorderStyle="None"
CssClass="grid_Header"></HeaderStyle>
<Columns>
<asp:BoundField DataField="KontaktNr" SortExpression="KontaktNr"
Visible="False"></asp:BoundField>
<asp:TemplateField HeaderText="Selected">
<ItemTemplate>
<asp:CheckBox id="cbSelectedRecipient" runat="server"
Checked="False"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:ButtonField CommandName="eMail" HeaderText="E-Mail"
SortExpression="EMail" DataTextField="EMail"></asp:ButtonField>
</Columns>
<PagerStyle ForeColor="White" Font-Bold=true Font-Size=11px
Font-Names=Verdana></PagerStyle>
<PagerSettings
FirstPageImageUrl="~/Res/PrevYear.ico" FirstPageText="First"
LastPageImageUrl="~/Res/NextYear.ico"
LastPageText="Last" Mode="NumericFirstLast" />
</asp:GridView>

May 31 '06 #1
2 3866
This should work fine.
Look at HTML source of your page after it is rendered and see if style is
applied or not.

"Kamen" <Ka***@discussions.microsoft.com> wrote in message
news:05**********************************@microsof t.com...
Hello there,

I try to define the properties font-size and font-bold of the pager of a
gridview using the pagerstyle, but the settings are not appleyd at run
time.

What could be the reason for this?
I am very appreciated for your help.
Kamen

Here is the ASPX-code:

<asp:GridView ID="gvMailingPersons" style="Z-INDEX:
106;
LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server"
BorderColor="#999999"
BorderStyle="NotSet" BackColor="White" CellPadding="3"
GridLines="Vertical"
AutoGenerateColumns="False" DataSource="<%# DS_MailingPersons %>"
Height="8px" Width="990px" CssClass="grid" AllowSorting="true"
AllowPaging="true" PageSize="50" PagerSettings-Position=Bottom
DataKeyNames="KontaktNr">
<SelectedRowStyle Font-Bold="True"></SelectedRowStyle>
<AlternatingRowStyle
CssClass="grid_AlternatingItem"></AlternatingRowStyle>
<RowStyle CssClass="grid_Item"></RowStyle>
<HeaderStyle Wrap="False" ForeColor="White" BorderStyle="None"
CssClass="grid_Header"></HeaderStyle>
<Columns>
<asp:BoundField DataField="KontaktNr" SortExpression="KontaktNr"
Visible="False"></asp:BoundField>
<asp:TemplateField HeaderText="Selected">
<ItemTemplate>
<asp:CheckBox id="cbSelectedRecipient" runat="server"
Checked="False"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:ButtonField CommandName="eMail" HeaderText="E-Mail"
SortExpression="EMail" DataTextField="EMail"></asp:ButtonField>
</Columns>
<PagerStyle ForeColor="White" Font-Bold=true Font-Size=11px
Font-Names=Verdana></PagerStyle>
<PagerSettings
FirstPageImageUrl="~/Res/PrevYear.ico" FirstPageText="First"
LastPageImageUrl="~/Res/NextYear.ico"
LastPageText="Last" Mode="NumericFirstLast" />
</asp:GridView>

May 31 '06 #2
Hi Winista,

Thank you for your response!
After the page is rendered is the style applied in the HTML source, but not
visible in the browser (IE 6.0).
Only the properties "color:White" and "font-family:Verdana" take effect.

Should I take care of speciality settings of the browser?

Here is the HTML-code after the page is rendered :

<div>
<table title="752 Datensätze" class="grid" cellspacing="0" cellpadding="3"
rules="cols" bordercolor="#999999" border="1" id="gvMailingPersons"
style="background-color:White;border-color:#999999;height:8px;width:990px;border-collapse:collapse;Z-INDEX: 106; LEFT: 8px; POSITION: absolute; TOP: 329px">
<tr class="grid_Header" nowrap="nowrap"
style="color:White;border-style:None;">
<th scope="col">Ausgewählt</th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$Reaktion')"
style="color:White;">Status</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$KontaktPerson')"
style="color:White;">Nachname</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$Vorname')"
style="color:White;">Vorname</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$Firmenname1')"
style="color:White;">Medium 1</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$EMail')"
style="color:White;">E-Mail</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$Telefax')"
style="color:White;">Telefax</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$Versandart')"
style="color:White;">Versandart</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$AdressAnrede')"
style="color:White;">Adressanrede</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$PLZ')"
style="color:White;">PLZ</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$Ort')"
style="color:White;">Ort</a></th><th scope="col"><a
href="javascript:__doPostBack('gvMailingPersons',' Sort$Strasse')"
style="color:White;">Strasse</a></th>
</tr><tr class="grid_Item">
<td>

<input id="gvMailingPersons__ctl2_cbSelectedRecipient"
type="checkbox" name="gvMailingPersons:_ctl2:cbSelectedRecipient"
/></td><td> </td><td style="color:#003399;"><a
href="javascript:__doPostBack('gvMailingPersons',' Details$0')"
style="color:#003399;">Zingraff</a></td><td>Matthias</td><td
style="color:#003399;"><a
href="javascript:__doPostBack('gvMailingPersons',' Details$0')"
style="color:#003399;">Matthias Zingraff</a></td><td
style="color:#003399;"><a
href="javascript:__doPostBack('gvMailingPersons',' eMail$0')"
style="color:#003399;"></a></td><td>05235/99823</td><td> </td><td>Herrn
Matthias Zingraff</td><td>32825</td><td>Blomberg</td><td>Kirchhofstraße 1</td>
</tr><tr class="grid_AlternatingItem">
<td>

<input id="gvMailingPersons__ctl3_cbSelectedRecipient"
type="checkbox" name="gvMailingPersons:_ctl3:cbSelectedRecipient"
/></td><td> </td><td style="color:#003399;"><a
href="javascript:__doPostBack('gvMailingPersons',' Details$1')"
style="color:#003399;">Zobel</a></td><td> </td><td style="color:#003399;"><a
href="javascript:__doPostBack('gvMailingPersons',' Details$1')"
style="color:#003399;">Lions District 111 WL</a></td><td
style="color:#003399;"><a
href="javascript:__doPostBack('gvMailingPersons',' eMail$1')"
style="color:#003399;"></a></td><td> </td><td> </td><td>Herrn
Zobel</td><td>33334</td><td>Gütersloh</td><td>Herzebrockerstr. 225</td>
</tr><tr
style="color:White;font-family:Verdana;font-size:11px;font-weight:bold;">
<td colspan="12"><table border="0">
<tr>
<td><input type="image" src="../Res/PrevYear.ico" alt="First"
border="0" onclick="javascript:__doPostBack('gvMailingPersons ','Page$First')"
language="javascript" /></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$6')"
style="color:White;">...</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$7')"
style="color:White;">7</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$8')"
style="color:White;">8</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$9')"
style="color:White;">9</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$10')"
style="color:White;">10</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$11')"
style="color:White;">11</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$12')"
style="color:White;">12</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$13')"
style="color:White;">13</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$14')"
style="color:White;">14</a></td><td><a
href="javascript:__doPostBack('gvMailingPersons',' Page$15')"
style="color:White;">15</a></td><td><span>16</span></td>
</tr>
</table></td>
</tr>
</table>
</div>

"Winista" wrote:
This should work fine.
Look at HTML source of your page after it is rendered and see if style is
applied or not.

"Kamen" <Ka***@discussions.microsoft.com> wrote in message
news:05**********************************@microsof t.com...
Hello there,

I try to define the properties font-size and font-bold of the pager of a
gridview using the pagerstyle, but the settings are not appleyd at run
time.

What could be the reason for this?
I am very appreciated for your help.
Kamen

Here is the ASPX-code:

<asp:GridView ID="gvMailingPersons" style="Z-INDEX:
106;
LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server"
BorderColor="#999999"
BorderStyle="NotSet" BackColor="White" CellPadding="3"
GridLines="Vertical"
AutoGenerateColumns="False" DataSource="<%# DS_MailingPersons %>"
Height="8px" Width="990px" CssClass="grid" AllowSorting="true"
AllowPaging="true" PageSize="50" PagerSettings-Position=Bottom
DataKeyNames="KontaktNr">
<SelectedRowStyle Font-Bold="True"></SelectedRowStyle>
<AlternatingRowStyle
CssClass="grid_AlternatingItem"></AlternatingRowStyle>
<RowStyle CssClass="grid_Item"></RowStyle>
<HeaderStyle Wrap="False" ForeColor="White" BorderStyle="None"
CssClass="grid_Header"></HeaderStyle>
<Columns>
<asp:BoundField DataField="KontaktNr" SortExpression="KontaktNr"
Visible="False"></asp:BoundField>
<asp:TemplateField HeaderText="Selected">
<ItemTemplate>
<asp:CheckBox id="cbSelectedRecipient" runat="server"
Checked="False"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateField>
<asp:ButtonField CommandName="eMail" HeaderText="E-Mail"
SortExpression="EMail" DataTextField="EMail"></asp:ButtonField>
</Columns>
<PagerStyle ForeColor="White" Font-Bold=true Font-Size=11px
Font-Names=Verdana></PagerStyle>
<PagerSettings
FirstPageImageUrl="~/Res/PrevYear.ico" FirstPageText="First"
LastPageImageUrl="~/Res/NextYear.ico"
LastPageText="Last" Mode="NumericFirstLast" />
</asp:GridView>


Jun 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
11026
by: sck10 | last post by:
Hello, How do you change the color of the gridlines in the GridView control? I have tried changing the following, but only the border changes to black, but the grid lines stay a light gray: ...
6
24650
by: Tim Cartwright | last post by:
I am trying to figure out how to change the gridview caption style, but I can not figure out how. I added table caption { background-color: #5D7B9D; color: White; font-size: 16pt; } to my...
1
1806
by: Edward | last post by:
On mine ASP 2.0 page I've two gridviews. The second depends on the selected value of the first one. Everything is working ok. When selecting a row from the first, the second gridview is displaying...
0
1197
by: Steven Nagy | last post by:
Howdy, In design mode of a gridview, setting the PagerStyle CssClass property, and then refreshing the gridview via rightclick -refresh, to get the new styles applied, and the property gets...
0
2465
by: Mike P | last post by:
I am trying to edit a gridview while using paging, but whenever I try to edit a row on a page other than page 1, I get an error. Here is my gridview and my code : <asp:GridView ID="GridView1"...
1
5638
by: kuangzhang | last post by:
Dear MS Gurus, I have read many posts on the Gridview pagerstyle problem but have yet to see a fix or an work around. Following is what I am experiencing: in the Aspx Page I have this <PagerStyle...
0
1295
by: jaredciagar | last post by:
Hi Guys, Can You Help Me PLease, I'm Currently facing Problems in my system... I need some help... I'm using VB script,ASP.net,MS SQL Server2005 I want to select a specific data in...
3
2630
by: RobertTheProgrammer | last post by:
Hi folks, I've got another problem. Basically, I'm trying to use a nested GridView, however the nexted GridView displays no values (even though in debug I'm getting valid values into my DataSet. ...
2
1775
by: xMetalDetectorx | last post by:
Hi Everyone, I have a very simple web app that uses .Net 2.0 login control to authenticate users and allow access to an "admin" folder. Inside that admin folder I have one page that has a...
0
7105
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7180
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.