Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old 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
Default 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
  #2 (permalink)  
Old August 6th, 2008, 06:51 PM
Wrox Author
 
Join Date: Sep 2006
Location: Tallahassee, FL, USA.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to surfer5 Send a message via AIM to surfer5 Send a message via MSN to surfer5 Send a message via Yahoo to surfer5
Default

Hey Jim (again :))-

Can you post your CSS and ASPX code? I am hoping its just something small and, if I can see what you have going on, I might be able to figure it out.

You can also try downloading the code for chapter 5 here:

http://media.wiley.com/product_ancil.../Chapter_5.zip

There you might be able to see if the original code works in your environment or not. That can help us figure out what's breaking.

Thanks!

-Jacob



Jacob J. Sanford
Author of Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages
Co-author of Professional SharePoint 2007 Design
  #3 (permalink)  
Old 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
Default

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
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get selected item from listview? try.test.abc C# 1 January 4th, 2007 02:34 AM
How Refer to Selected Item in DataGrid Morfoman General .NET 0 September 20th, 2005 12:41 PM
re: DataGrid Selected Item from outside grid vids ASP.NET 1.x and 2.0 Application Design 1 May 2nd, 2005 05:12 PM
Datagrid - Scroll to selected item rodmcleay ASP.NET 1.0 and 1.1 Professional 2 February 21st, 2005 08:36 PM
How to get selected Item from Listbox? Iceman571 ADO.NET 1 March 25th, 2004 06:33 AM



All times are GMT -4. The time now is 11:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.