473,804 Members | 3,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="#0 00000" BorderStyle="So lid"
RowStyle-BorderColor="#0 00000" RowStyle-BorderStyle="So lid"
GridLines="Both ">

Any help would be appreciated.

--
Thanks in advance,

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

works for me

"sck10" <sc***@online.n ospam> wrote in message
news:%2******** ********@TK2MSF TNGP14.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="#0 00000" BorderStyle="So lid"
RowStyle-BorderColor="#0 00000" RowStyle-BorderStyle="So lid"
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="S qlDataSource1"
autogeneratecol umns="False" backcolor="Whit e" bordercolor="Ye llow" >
<alternatingrow style font-italic="False" font-bold="False">
</alternatingrows tyle>
<pagerstyle font-italic="False" font-bold="False">
</pagerstyle>
<columnfields >
<asp:templatefi eld headertext="Ord erID">
<itemtemplate >
<asp:label runat="server" text='<%#
DataBinder.Eval (Container, "DataItem.Order ID") %>'>
</asp:label>
</itemtemplate>
</asp:templatefie ld>
<asp:boundfie ld sortexpression= "CustomerID "
datafield="Cust omerID" headertext="Cus tomerID">
</asp:boundfield>
<asp:boundfie ld sortexpression= "EmployeeID "
datafield="Empl oyeeID" headertext="Emp loyeeID">
</asp:boundfield>
<asp:boundfie ld sortexpression= "OrderDate"
datafield="Orde rDate" headertext="Ord erDate">
</asp:boundfield>
<asp:boundfie ld sortexpression= "RequiredDa te"
datafield="Requ iredDate" headertext="Req uiredDate">
</asp:boundfield>
<asp:boundfie ld sortexpression= "ShippedDat e"
datafield="Ship pedDate" headertext="Shi ppedDate">
</asp:boundfield>
<asp:boundfie ld sortexpression= "ShipVia"
datafield="Ship Via" headertext="Shi pVia">
</asp:boundfield>
<asp:boundfie ld sortexpression= "Freight"
datafield="Frei ght" headertext="Fre ight">
</asp:boundfield>
<asp:boundfie ld sortexpression= "ShipName"
datafield="Ship Name" headertext="Shi pName">
</asp:boundfield>
<asp:boundfie ld sortexpression= "ShipAddres s"
datafield="Ship Address" headertext="Shi pAddress">
</asp:boundfield>
<asp:boundfie ld sortexpression= "ShipCity"
datafield="Ship City" headertext="Shi pCity">
</asp:boundfield>
<asp:boundfie ld sortexpression= "ShipRegion "
datafield="Ship Region" headertext="Shi pRegion">
</asp:boundfield>
<asp:boundfie ld sortexpression= "ShipPostalCode "
datafield="Ship PostalCode" headertext="Shi pPostalCode">
</asp:boundfield>
<asp:boundfie ld sortexpression= "ShipCountr y"
datafield="Ship Country" headertext="Shi pCountry">
</asp:boundfield>
</columnfields>
<pagersetting s mode="NextPrev" >
</pagersettings>
<selectedrowsty le font-italic="False" font-bold="False">
</selectedrowstyl e>
<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
6224
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 if it is in front of the value? My guess would be to use a template column but I dont know how to go about this. Any ideas? Below is an example of what the data looks like raw from the database: $456.95 200.89
1
4581
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 conditional formatting on the gridview but it doesnt have the same methods. Currently in my datagrid I have this (this is just hacked together randomly but gives you the idea):
4
2621
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 re-format the updated row fields. I have looked at gridView.rowUpdated method, but cannot figure out how....
3
2099
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 anyone see what the problem is with the following code.... <asp:TemplateField HeaderText="Departure Date"> <ItemTemplate>
2
16362
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 DataFormatString is set to "{0:d}" in order to display the date in short date format (without the time). But the DataFormatString doesn't seem to have any effect. The DateTime gets displayed with the time. I have another GridView that is bound...
3
2403
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 formatting working in the gridView?
4
8338
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 date column always shows the date and time while I just want the short date. I have tried applying a format string {0:d} but to no avail. I saw a lot of posts regarding the htmlencode property but I do not know how to turn that off for a...
2
11726
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
2091
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 14:23:28". I want to display it as "03/30/02". I've included the code below. Can anyone offer an explanation? <asp:SqlDataSource ID="DD_Issues" runat="server"
2
2422
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 monthly info but the last few show other information. The gridview is bound to a stored procedure that returns data something like this: 'Jan 2007', 0 'Feb 2007', 8
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10578
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.