473,325 Members | 2,828 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,325 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 11020
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.