Showing posts with label columns. Show all posts
Showing posts with label columns. Show all posts

Saturday, March 31, 2012

Table Sizing

Hi All,

I have a table with three columns but I want to make the left had column a fixed width?

Is this possible?

For example if the table is 300 pixels wide

I want column 1 to be 50 pixlels and column 2 & 3 125 pixles each!

anyone any ideas?

cheers

Tonyspecify width in pixels for first column, then percentage for other 2


<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50"> </td>
<td width="33%"> </td>
<td width="33%"> </td>
</tr>
</table
or size everything

<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50"> </td>
<td width="125"> </td>
<td width="125"> </td>
</tr>
</table>

Is that what you meant ??
col1:
width = 15%

col2 and col3
width = 42%

is that what you ment?

otherwise if you wanted col1 to always be 50 pixels

col1:
width = 50

withis the second column nest a table with two columns of width = %50

try that and tell me how it works

table server control -- make column invisible

I have a table server control (System.Web.UI.WebControls.Table) on my form
that has three columns. Sometimes I need the second column to be invisible,
sometimes the third. How can I set a column to be invisible in code? There
appears to not be a programmatic way to work with columns in the way that
there is rows.

Thanks.

--SusanI don't think there a Column Visible property for the WebControls.Table object. So you may have to handle this on your own

For example
foreach(TableRow tr in myTable.Rows

tr.Cells[yourcolumnindex].Visible = false

HTH
Suresh

-- Susan Geller wrote: --

I have a table server control (System.Web.UI.WebControls.Table) on my for
that has three columns. Sometimes I need the second column to be invisible
sometimes the third. How can I set a column to be invisible in code? Ther
appears to not be a programmatic way to work with columns in the way tha
there is rows

Thanks

--Susa

Wednesday, March 28, 2012

TableFooterRow & lines

hey
ASP.NET 2.0
On a webpage I've placed a table (server control) which consist of 2 columns
("Description" and "Amount")... At the buttom of the table I have a
TableFooterRow. In this TableFooterRow I want to display the sum of all the
amounts in the table. Right above the content in the TableFooterRow I want
a line to be displayed which separate that amount from the other amounts in
the table... In addition I would like to have a double line under the amount
in TableFooterRow...
example:
xxxxx : 2 000
yyyyy: 4 000
--
total: 6 000
=========
any ideas how to accomplish this?Use css styles to set top and bottom border for the footer row.
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Jeff" <donot@.spam.me> wrote in message
news:et0C7iEVIHA.5300@.TK2MSFTNGP03.phx.gbl...
> hey
> ASP.NET 2.0
> On a webpage I've placed a table (server control) which consist of 2
> columns ("Description" and "Amount")... At the buttom of the table I have
> a TableFooterRow. In this TableFooterRow I want to display the sum of all
> the amounts in the table. Right above the content in the TableFooterRow I
> want a line to be displayed which separate that amount from the other
> amounts in the table... In addition I would like to have a double line
> under the amount in TableFooterRow...
> example:
> xxxxx : 2 000
> yyyyy: 4 000
> --
> total: 6 000
> =========
> any ideas how to accomplish this?
>
I'm trying but the borders will not display... here is how I do it:
css:
.test
{
border-top:solid 2px Black;
background-color:Green; // debug info - I see the footer get a green
background,
// so the footer is reading this
css info
border-bottom:double 2px Black
}
<asp:TableFooterRow CssClass="test">
The footer get a green background color, but no borders... what am I doing
wrong here?
It is a known effect for table rows. Set borders instead for every cell.
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Jeff" <donot@.spam.me> wrote in message
news:%23GcKQQFVIHA.5360@.TK2MSFTNGP03.phx.gbl...
> I'm trying but the borders will not display... here is how I do it:
> css:
> .test
> {
> border-top:solid 2px Black;
> background-color:Green; // debug info - I see the footer get a green
> background,
> // so the footer is reading
> this css info
> border-bottom:double 2px Black
> }
> <asp:TableFooterRow CssClass="test">
> The footer get a green background color, but no borders... what am I doing
> wrong here?
>

tables & rows & columns

I have a table that doesn't line up the way I want it to. I have 6 rows and
3 columns. The 3rd column spans the 6 rows and contains a grid. If the
data in the grid has more than 6 rows of data, the other rows spread out
vertically, as if there is extra space in there. I don't want that to
happen, I want the 6 rows to be together as if there is no space between
then. I have tried using height, valign, using a set height and using a
percentage height and it doesn't work. How can I make the 6 rows on the
left align all the way to the top?
<table borderColor=red cellSpacing=0 cellPadding=0 width="100%" border=1
runat="server" ID="Table1">
<tr vAlign=top colspan=4><td> </td></tr>
<tr vAlign=top>
<td valign=top style="HEIGHT: 15px" align=left width=100>Col 1</td>
<td vAlign=top height=5>Col 2</td>
<td align=right rowspan=6>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col
3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col
3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br></td>
<td align=left rowspan=6>Col 4</td></tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
</table>Maybe I didn't really get your question, but I do not see a grid in the
3rd column.
But did you try to put another table into one cell? That often works.
Remy Blaettler
www.collaboral.com

tables & rows & columns

I have a table that doesn't line up the way I want it to. I have 6 rows and
3 columns. The 3rd column spans the 6 rows and contains a grid. If the
data in the grid has more than 6 rows of data, the other rows spread out
vertically, as if there is extra space in there. I don't want that to
happen, I want the 6 rows to be together as if there is no space between
then. I have tried using height, valign, using a set height and using a
percentage height and it doesn't work. How can I make the 6 rows on the
left align all the way to the top?

<table borderColor=red cellSpacing=0 cellPadding=0 width="100%" border=1
runat="server" ID="Table1">
<tr vAlign=top colspan=4><td> </td></tr
<tr vAlign=top>
<td valign=top style="HEIGHT: 15px" align=left width=100>Col 1</td>
<td vAlign=top height=5>Col 2</td>
<td align=right rowspan=6>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col
3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col
3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br>Col 3<br></td>
<td align=left rowspan=6>Col 4</td></tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top height=1>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr>
<tr valign=top>
<td valign=top>col 1</td>
<td valign=top>col 2</td>
</tr
</tableMaybe I didn't really get your question, but I do not see a grid in the
3rd column.
But did you try to put another table into one cell? That often works.

Remy Blaettler
www.collaboral.com

Monday, March 26, 2012

Tables, Rows and Columns....Questions....

I have inserted a table and had adjusted the table to what look nice to me. I've added rows, columns and all the extra goodies. The problem is that, whenever I launched it in the web browser, the table expands all the way to the upper right and left of the screen. Is there a way to make the table so that it's fixed, meaning that it stays the same way as what I have in the working screen.

I'm using Visual Studio 2005...at the moment.

Any suggestion...thanks,

NoobKid

You probably have the width set to 100% for the table - remove the width percentage and give it an exact pixel amount - that way it will stay the same size each time it's viewed

Saturday, March 24, 2012

Tag order

Hi,

I have over 40 textbox separated in 4 columns, each col
has 10 textbox.

I want to edit the tag order from top to down in first
col, then 2nd, 3rd and 4th col.

How can I control the tag order?

Thanks

TomDo you mean the "tab" order?

Set the tabindex property.

Cheers
Ken

"Tom" <kerocow@.yahoo.com> wrote in message
news:05bf01c3c5cd$97c6c6a0$a301280a@.phx.gbl...
: Hi,
:
: I have over 40 textbox separated in 4 columns, each col
: has 10 textbox.
:
: I want to edit the tag order from top to down in first
: col, then 2nd, 3rd and 4th col.
:
: How can I control the tag order?
:
: Thanks
:
: Tom