DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 26 Jul 2007 15:41:07 -0400,    posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol        back       

Thread Index
  1    Bill Rossi
          2    Teemu Keiski


Datagrid Style Question   
I would like to have the line between certain columns in my datagrid darker 
or a different color than the other lines between columns.  Does anyone know 
how to accomplish this?  Thanks in advance.

Bill Rossi
Date:Thu, 26 Jul 2007 15:41:07 -0400   Author:  

Re: Datagrid Style Question   
Hi,

one way is in ItemCreated event (or with GridView in RowCreated event), 
trying top set styles directly at the cells. For example:

Protected Sub DataGrid1_ItemCreated(ByVal sender As Object, ByVal e As 
System.Web.UI.WebControls.DataGridItemEventArgs) Handles 
DataGrid1.ItemCreated
        If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = 
ListItemType.AlternatingItem Then
            e.Item.Cells(0).Style("border-left") = "10px solid red"
        End If
    End Sub


-- 
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Bill Rossi"  wrote in message 
news:f8atcj$jss$1@s0b1a68.ssa.gov...

>I would like to have the line between certain columns in my datagrid darker 
>or a different color than the other lines between columns.  Does anyone 
>know how to accomplish this?  Thanks in advance.
>
> Bill Rossi
>
>
> 
Date:Wed, 1 Aug 2007 20:13:58 +0300   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us