row height in dynamic asp:table

Discussion in 'ASP .Net' started by hansiman, Oct 2, 2004.

  1. hansiman

    hansiman Guest

    Why can't I set height of a table row in the code:

    tRow.Height = "35"

    or

    tRow.Height = 35

    both fails?

    /M
     
    hansiman, Oct 2, 2004
    #1
    1. Advertising

  2. Hi,

    You need to specify it in units:

    tRow.Height = Unit.Pixel("35")

    Good luck! Ken.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and need help, email me.

    "hansiman" <> wrote in message
    news:...
    > Why can't I set height of a table row in the code:
    >
    > tRow.Height = "35"
    >
    > or
    >
    > tRow.Height = 35
    >
    > both fails?
    >
    > /M
    >
     
    Ken Dopierala Jr., Oct 2, 2004
    #2
    1. Advertising

  3. hansiman

    hansiman Guest

    thanks, but ...

    even if I state "Imports System.Drawing"

    tRow.Cells = Unit.pixel(35)

    fails

    The examples in VS seem only to imports System.Drawing

    /M

    On Sat, 2 Oct 2004 06:40:24 -0500, "Ken Dopierala Jr."
    <> wrote:

    >Hi,
    >
    >You need to specify it in units:
    >
    >tRow.Height = Unit.Pixel("35")
    >
    >Good luck! Ken.
     
    hansiman, Oct 2, 2004
    #3
  4. Hi,

    It isn't in System.Drawing. If you hover your mouse over the error it
    should tell you the namespace. Try:

    tRow.Height = System.Web.UI.WebControls.Unit.Pixel("35")

    Also in your code below you are trying to set Cells to a height. You can't
    do that, Cells is a read-only property. Good luck! Ken.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight
    If you sign up under me and need help, email me.

    "hansiman" <> wrote in message
    news:...
    > thanks, but ...
    >
    > even if I state "Imports System.Drawing"
    >
    > tRow.Cells = Unit.pixel(35)
    >
    > fails
    >
    > The examples in VS seem only to imports System.Drawing
    >
    > /M
    >
    > On Sat, 2 Oct 2004 06:40:24 -0500, "Ken Dopierala Jr."
    > <> wrote:
    >
    > >Hi,
    > >
    > >You need to specify it in units:
    > >
    > >tRow.Height = Unit.Pixel("35")
    > >
    > >Good luck! Ken.

    >
     
    Ken Dopierala Jr., Oct 2, 2004
    #4
  5. hansiman

    hansiman Guest

    Thanks a lot :)

    On Sat, 2 Oct 2004 07:21:50 -0500, "Ken Dopierala Jr."
    <> wrote:

    >Hi,
    >
    >It isn't in System.Drawing. If you hover your mouse over the error it
    >should tell you the namespace. Try:
    >
    >tRow.Height = System.Web.UI.WebControls.Unit.Pixel("35")
    >
    >Also in your code below you are trying to set Cells to a height. You can't
    >do that, Cells is a read-only property. Good luck! Ken.
     
    hansiman, Oct 2, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thomas A. Rowe

    Re: Table row height problems

    Thomas A. Rowe, Jun 23, 2003, in forum: HTML
    Replies:
    7
    Views:
    1,306
    Mark Parnell
    Jun 24, 2003
  2. W@cek
    Replies:
    0
    Views:
    1,643
    W@cek
    Mar 31, 2005
  3. phl
    Replies:
    1
    Views:
    4,438
    Martin Jay
    Jun 8, 2006
  4. D
    Replies:
    0
    Views:
    257
  5. john T
    Replies:
    7
    Views:
    249
    Richard Formby
    Feb 19, 2004
Loading...

Share This Page