Solved

set border color for cell in code behind

Posted on 2004-08-06
3
396 Views
Last Modified: 2008-03-10
Hi,
I am creating a table dynamically in code and having a hard time setting the border color of the cells.
I need the cells to look like buttons or at the very least have some dimenson.
What Im looking for is to set the Top and Left cell border to gray and bottom and right to black.
Right now I'm setting some of the properties like this:

cell.BackColor = Color.SteelBlue
cell.attributes("onclick") = "Javascript:style.cursor='hand'"
ect..
I must be skirting around it.
Any help would be appreciated.
Thanks
0
Comment
Question by:MiddletownRI
  • 2
3 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11741145
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolswebcontrolclassbordercolortopic.asp you would set it on the table ... you could also use CSS to set it on the individual cell through the CssClass Property on the cell.
0
 

Author Comment

by:MiddletownRI
ID: 11745077
I don't see how I can set the individual cell border (top, bottom) .
I'm creating the table and cells in code.
Do you have an example?
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 500 total points
ID: 11745100
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now