473,385 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

GridView Formatting

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:

BorderColor="#000000" BorderStyle="Solid"
RowStyle-BorderColor="#000000" RowStyle-BorderStyle="Solid"
GridLines="Both">

Any help would be appreciated.

--
Thanks in advance,

Steven
Nov 18 '05 #1
4 11023
BorderColor=???

works for me

"sck10" <sc***@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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:

BorderColor="#000000" BorderStyle="Solid"
RowStyle-BorderColor="#000000" RowStyle-BorderStyle="Solid"
GridLines="Both">

Any help would be appreciated.

--
Thanks in advance,

Steven

Nov 18 '05 #2
Hi Sck10,

As for the setting GridLine's color in asp.net2 GridView Control, I think
sck10 is suggestion is exactly the correct means. I've also test on my
side. This works when we set the GridView's GridLine = Both and changing
the BorderColor property will make the gridlines' color also change. You
may have a try to see wheher it works. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #3
Hi Sck10,

Thanks for your followup. It really seems a bit strange. Here is my test
page 's template
==================================
<asp:gridview id="GridView1" runat="server" datasourceid="SqlDataSource1"
autogeneratecolumns="False" backcolor="White" bordercolor="Yellow" >
<alternatingrowstyle font-italic="False" font-bold="False">
</alternatingrowstyle>
<pagerstyle font-italic="False" font-bold="False">
</pagerstyle>
<columnfields>
<asp:templatefield headertext="OrderID">
<itemtemplate>
<asp:label runat="server" text='<%#
DataBinder.Eval(Container, "DataItem.OrderID") %>'>
</asp:label>
</itemtemplate>
</asp:templatefield>
<asp:boundfield sortexpression="CustomerID"
datafield="CustomerID" headertext="CustomerID">
</asp:boundfield>
<asp:boundfield sortexpression="EmployeeID"
datafield="EmployeeID" headertext="EmployeeID">
</asp:boundfield>
<asp:boundfield sortexpression="OrderDate"
datafield="OrderDate" headertext="OrderDate">
</asp:boundfield>
<asp:boundfield sortexpression="RequiredDate"
datafield="RequiredDate" headertext="RequiredDate">
</asp:boundfield>
<asp:boundfield sortexpression="ShippedDate"
datafield="ShippedDate" headertext="ShippedDate">
</asp:boundfield>
<asp:boundfield sortexpression="ShipVia"
datafield="ShipVia" headertext="ShipVia">
</asp:boundfield>
<asp:boundfield sortexpression="Freight"
datafield="Freight" headertext="Freight">
</asp:boundfield>
<asp:boundfield sortexpression="ShipName"
datafield="ShipName" headertext="ShipName">
</asp:boundfield>
<asp:boundfield sortexpression="ShipAddress"
datafield="ShipAddress" headertext="ShipAddress">
</asp:boundfield>
<asp:boundfield sortexpression="ShipCity"
datafield="ShipCity" headertext="ShipCity">
</asp:boundfield>
<asp:boundfield sortexpression="ShipRegion"
datafield="ShipRegion" headertext="ShipRegion">
</asp:boundfield>
<asp:boundfield sortexpression="ShipPostalCode"
datafield="ShipPostalCode" headertext="ShipPostalCode">
</asp:boundfield>
<asp:boundfield sortexpression="ShipCountry"
datafield="ShipCountry" headertext="ShipCountry">
</asp:boundfield>
</columnfields>
<pagersettings mode="NextPrev">
</pagersettings>
<selectedrowstyle font-italic="False" font-bold="False">
</selectedrowstyle>
<rowstyle font-italic="False" font-bold="False">
</rowstyle>
<headerstyle font-italic="False" font-bold="False">
</headerstyle>
<footerstyle font-italic="False" font-bold="False">
</footerstyle>
</asp:gridview>
===============================

seems haven"t any difference. Have you tried creating a new aspx page or
even a new project on some other machines to see whether the problem still
remain? Currently I also haven't any good idea on this.

In addition, I think you can also have a look in the Whidbey beat
newsgroup to see whether there're any clues:
Microsoft Visual Studio 2005 Newsgroups
http://communities.microsoft.com/new...idbey&slcid=us

Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #4
Hi Sck10,

Have you got any further progresses on this issue? If there're anything
else we can help, please feel free to post here.Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #5

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

Similar topics

3
by: washoetech | last post by:
I have a gridview control. In this grid view there is a column for the price of an item. Some of the prices have a dollar sign in front of it and some dont. How do I get rid of the dollar sign...
1
by: euan | last post by:
HI Guys, I have bee using conditional formatting in the datagrid recently and I am moving over to framework 2.0 and noticed the datagrid has been replaced by the gridview. So, I would like to do...
4
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I...
3
by: Simon Harvey | last post by:
Hi all, I'm having problems getting my date to format. Someone told me that with the GridView, you need to use a TemplateColumn and not a BoundColumn when displaying dates. Given that, can...
2
by: Rob Roberts | last post by:
I have a GridView that is bound to a collection of DateTimes (i.e. - Collection<DateTime>). I have a BoundField in the GridView, and its DataField is set to the DateTime's Date property, and the...
3
by: CSharpguy | last post by:
I'm trying to format the GridView on my web form and its not working. for money I have {0:C} and for date fields, I have {0:d} and the format isn't changing, what else do I need to do to get the...
4
by: Ken Wigle | last post by:
All, I would be very grateful for any help on this question. I have an application in asp.net 2.0 where I dynamically create a datatable and then bind that to a gridview. Unfortunately, the...
2
by: Jacksm | last post by:
How can I align an asp:table columns with gridview columns (the widths)? I have tried setting table.column(0).width = gridview.column(0).width at page_load but it doesn't work. Thanks in advance
2
by: pgonzo | last post by:
In my initial tests with the GridView control, I cannot understand why the DataFormatString attribute has no affect on the column formatting. The 'creation_date' field is being reported as "3/30/02...
2
by: tomh2099 | last post by:
Hi, Hi, I have an ASP.NET 2005 application (using VB) with a GridView control that needs to have the last 5 or 6 rows in Bold or maybe some other special formatting. Most of the rows show...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.