Border drawn in C# Table programmaticall y even if several adjacent horizontal & vertical cells are empty in the table
I want to programmaticall y have border on each and every row and column in the table even if several adjacent horizontal and vertical cells contains no value. The table control (MyTbl) is in ASP. I am programmaticall y populating the TableCell and TableRow in that MyTbl in ASP. The problem is, no line for the row border gets created if two consecutive rows for a given column are empty. My goal is to have row border for each and every row and column irrespective of the cell value being empty. The MyTbl control in ASP has Gridlines set as both and Borderstyle as solid.
MyTbl control in ASP gets populated as:
TableRow r = new TableRow();
//r.BorderStyle = BorderStyle.Sol id;
TableCell cellID = new TableCell();
//cell.BorderStyl e = BorderStyle.Sol id;
cellID.Text = ..... some kind of value
//r.BorderStyle = BorderStyle.Sol id;
r.Cells.Add(cel lID);
MyTbl.Rows.Add( r);
I tried adding BorderStyle as Solid to both row and cell with no luck. If two corresponding rows for a given column are empty, no boundary line is drawn between two columns.
How can I have boundary line for each and every row and column even if several horizontal and vertical cells have no value?
2 16515
You may want try asking this in the ASP forum as well...
Border drawn in C# Table programmaticall y even if several adjacent horizontal & vertical cells are empty in the table
I want to programmaticall y have border on each and every row and column in the table even if several adjacent horizontal and vertical cells contains no value. The table control (MyTbl) is in ASP. I am programmaticall y populating the TableCell and TableRow in that MyTbl in ASP. The problem is, no line for the row border gets created if two consecutive rows for a given column are empty. My goal is to have row border for each and every row and column irrespective of the cell value being empty. The MyTbl control in ASP has Gridlines set as both and Borderstyle as solid.
MyTbl control in ASP gets populated as:
TableRow r = new TableRow();
//r.BorderStyle = BorderStyle.Sol id;
TableCell cellID = new TableCell();
//cell.BorderStyl e = BorderStyle.Sol id;
cellID.Text = ..... some kind of value
//r.BorderStyle = BorderStyle.Sol id;
r.Cells.Add(cel lID);
MyTbl.Rows.Add( r);
I tried adding BorderStyle as Solid to both row and cell with no luck. If two corresponding rows for a given column are empty, no boundary line is drawn between two columns.
How can I have boundary line for each and every row and column even if several horizontal and vertical cells have no value?
I believe that you will get better results using CSS, rather than trying to program the table border style. Set its border, width and color in your stylesheet...
Hope that this helps.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Doug Baroter |
last post by:
Hi,
I'm on SQL Server 2000, say, I have a table named , how I find
if there is any column which has a formula in it? In other words, how
to identify formula column programmatically? I've looked at
information_schema.columns view for clue but to no avail.
Thanks.
|
by: bubbles |
last post by:
i have a HTML file and it already has a HTML table and a few rows created by
default.. however, i would like to add more rows to this table
programmatically
may i know how?
|
by: Amos |
last post by:
Dear Sirs
I am trying to build a cash flow software, first I thought to build one
table for each cash and bank account, but talking to some people they
suggested me to build one unique table for all bank and cash accounts,
putting one more column to identify each bank or cash account.
The unique table has this columns structure:
ID Date B/C account FinCode Description Debit
Credit
|
by: Prakash Wadhwani |
last post by:
I have an Access Database called "TEMP"
On Opening the "TEMP" Database, I need to use VBA (programmatically):
a) to connect to another database called "PMF"
b) the PMF database requires a password on opening called "allow"
c) to link 5 Tables in the PMF Database ... Table1,2,3,4,5
How do I accomplish the above programmatically using VBA ?
Thx & Best Rgds,
|
by: Zlatko Matiæ |
last post by:
Hello.
I tried to create table from the query recordset, but it seems that I can't
set FieldType and FieldSize by variable...What is wrong?
qryrs is QueryDef recordset (pass-through query)...
Set tbl = db.CreateTableDef(IME_TABLICE)
For I = 0 To qryrs.Fields.Count - 1
| |
by: David Tilman |
last post by:
I need to create some tables on a web page at run time rather than design
time. There could be 1 - 5 tables on the page depending on options. I've
created the tables by creating the cells, rows, and tables just as I want
them, but I don't know how to get them to render. Is there a function to add
the html code for the tables to the aspx file during run time? What is the
best way to handle this. Any examples I find to creating tables...
|
by: Martin Widmer |
last post by:
Hi guys
I am looking for the best way to generate new reports with reporting
services for SQL server 2005. The reports will be generated programmatically
from a .Net VB application. So far I see the only way to do it is to feature
my objects (text blocks, pictures, tables drawn from excel and databases
etc.) with a "render to RDL"- function and thus create an RDL definition of
the report, then push that one to the server using the...
|
by: Derek Broughton |
last post by:
I have an access table with a column defined as an OLEObject.
I can drag and drop an Excel file into this column.
I can create a form with an unbound ObjectFrame, and load a spreadsheet into
it with a FileDialog and a little VBA code.
I can even open the spreadsheet from VBA - either directly from the
filesystem or from the embedded object in the form control - and manipulate
the individual Cells(). What I can't seem to accomplish is...
|
by: JacoE |
last post by:
Hi,
I'm would like to create a new Group, and then add some tables to this
group programmatically. Could someone please point me in the right
direction. I'm completely stumped on this one.
Any code on how to manage these groups will be most helpfull.
ps. I'm using MS Access 2000.
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |