|
|
 |
BOOK: Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages ISBN: 978-0-470-12448-2
 | This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages by Jacob J. Sanford; ISBN: 9780470124482 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages ISBN: 978-0-470-12448-2 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

July 8th, 2008, 09:06 PM
|
|
Registered User
|
|
Join Date: Jul 2008
Location: Dawsonville, GA, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Chapter 5 GridView Selected Item
On page 175 of chapter 5, the background of red (#FF0000) for a Selected row only works on normal rows but is not working for alternate rows! How do I correct this problem?
Thanks,
Jim
|

August 8th, 2008, 04:11 PM
|
|
Registered User
|
|
Join Date: Jul 2008
Location: Dawsonville, GA, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Jacob,
Thanks for responding.
I downloaded the chapter5 code and my code looks the same. I tried to even replace my CSS file with your CSS file and I still have the same problem. Interestingly, your chapter5 code works correctly! In my project, when I click [u]Select</u> on an Alternating row, the row takes on the color of the Normal rows instead of the "Selected" color. The "Selected" color works fine on the Normal rows. I don't understand it.
Here is my aspx code:
Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridView.aspx.cs" Inherits="GridView" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>GridView Example Page</title>
<link href="myGridView.css" rel="stylesheet" type="text/css" />
<link id="Link1" href="~/CSS/Import.css" rel="Stylesheet" type="text/css" runat="server" />
<!--[if lt IE 7]>
<link runat="server" rel="stylesheet" type="text/css" href="~/CSS/BrowserSpecific/IEMenu6.css" />
<![endif]-->
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/GridviewSource.xml">
</asp:XmlDataSource>
<br />
<asp:GridView CssSelectorClass="PrettyGridView" AllowPaging="true" PageSize="3" ToolTip="example" ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="XmlDataSource1">
<Columns>
<asp:CommandField ShowSelectButton="true" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="URL" HeaderText="URL" SortExpression="URL" />
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
Jim
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |