How to change DataList height

Discussion in 'ASP .Net Web Controls' started by Angel, Nov 2, 2004.

  1. Angel

    Angel Guest

    How can I change the number of items that are seen without scrolling in
    DataList.
    I tried with changing DataList.Height but it does not seems to work.

    Thanks
    Angel
    Angel, Nov 2, 2004
    #1
    1. Advertising

  2. Using Javascript on the client side like:
    document.getElementById('listboxid').size = N;

    Using codebehind on server side like:
    listboxid.Rows = N;

    In both examples N denotes a positive integer. On the serverside Rows
    defaults to 4, but you can change it.

    On the serverside Height property denotes a height in any acceptable unit
    (normally in pixels) that is set on the client side as CSS style.

    --
    RobertK
    { Clever? No just smart. }

    "Angel" <> wrote in message
    news:...
    > How can I change the number of items that are seen without scrolling in
    > DataList.
    > I tried with changing DataList.Height but it does not seems to work.
    >
    > Thanks
    > Angel
    >
    >
    >
    >
    Robert Koritnik, Nov 2, 2004
    #2
    1. Advertising

  3. Angel

    Angel Guest

    I am talking about
    System.Web.UI.WebControls.DataList

    DataList does not have Rows property
    Angel, Nov 2, 2004
    #3
  4. Sorry. Silly me. By some higher power I was thinking about ListBox
    control...

    Ok. So We have a DataList. k. A DataList control renders as a <TABLE>
    element on the client side. Ok thinking about a DataList I don't exactly get
    what you want to acomplish. If I understand the problem you would like to
    make shure that a certain ammount of items are displayed in the client
    window. The number of items on the page depends on:
    - the font size you use
    - line hight set by CSS
    - window size
    - direction of your datalist item display

    Could you please explain a little bit more what do you need to do? I still
    don't think that I really get what you want.

    --
    RobertK
    { Clever? No just smart. }

    "Angel" <> wrote in message
    news:...
    > I am talking about
    > System.Web.UI.WebControls.DataList
    >
    > DataList does not have Rows property
    >
    >
    Robert Koritnik, Nov 3, 2004
    #4
    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. Nevyn Twyll
    Replies:
    8
    Views:
    1,843
  2. Replies:
    0
    Views:
    540
  3. Wotney
    Replies:
    1
    Views:
    519
    Flinky Wisty Pomm
    Oct 25, 2006
  4. tshad
    Replies:
    1
    Views:
    1,678
    bruce barker
    Mar 8, 2007
  5. Bernd Meier
    Replies:
    6
    Views:
    499
    GTalbot
    Jan 14, 2008
Loading...

Share This Page