Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 420
  • Last Modified:

set border color for cell in code behind

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
MiddletownRI
Asked:
MiddletownRI
  • 2
1 Solution
 
gregoryyoungCommented:
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
 
MiddletownRIAuthor Commented:
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
 
gregoryyoungCommented:
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now