How to use a scrollbar in a custom control

Discussion in 'ASP .Net Building Controls' started by ton, Mar 5, 2004.

  1. ton

    ton Guest

    I use a datagrid control and several onther controls in my custom server
    control. I do not want that the datagrid control uses all the space it seems
    to need. If the query I show has too many columns I rather use a horizontal
    scroll bar to keep it in the space, de webdesigner planned when drawing my
    control on his wab page.
    I simply kind influence (or keep fixed) keep the height and the width values
    of the datagrid.
    thanx

    Ton
     
    ton, Mar 5, 2004
    #1
    1. Advertising

  2. Hi Ton,
    Use a DIV tag around the datagrid with the OVERFLOW style set to the
    one you need.
    For eg:
    <DIV style="OVERFLOW: auto">put datagrid here</DIV> will use scroll bars if
    needed.
    <DIV style="OVERFLOW: scroll">put datagrid here</DIV> will always use scroll
    bars.

    You can do absolute positioning for the DIV to put it in the postition
    you need.
    Hope this helps.
    Regards,
    Marshal Antony
    ..NET Developer







    "ton" <> wrote in message
    news:c2a1qi$8u5$1.nb.home.nl...
    > I use a datagrid control and several onther controls in my custom server
    > control. I do not want that the datagrid control uses all the space it

    seems
    > to need. If the query I show has too many columns I rather use a

    horizontal
    > scroll bar to keep it in the space, de webdesigner planned when drawing my
    > control on his wab page.
    > I simply kind influence (or keep fixed) keep the height and the width

    values
    > of the datagrid.
    > thanx
    >
    > Ton
    >
    >
    >
    >
     
    Marshal Antony, Mar 7, 2004
    #2
    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. Ste M

    Custom scrollbar thumb

    Ste M, Aug 25, 2004, in forum: Java
    Replies:
    15
    Views:
    4,218
    zoopy
    Aug 27, 2004
  2. Replies:
    2
    Views:
    1,980
  3. Matt Sokol
    Replies:
    2
    Views:
    413
    Theo Tillotson
    Aug 7, 2003
  4. Prashanth Uppunda

    Having a Custom ScrollBar for Controls possible in .NET ?

    Prashanth Uppunda, Apr 30, 2004, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    512
    Jiho Han
    May 3, 2004
  5. Alex

    ScrollBar? Does it exist just WEB ScrollBar Control?

    Alex, Apr 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    292
    Alvin Bruney [MVP]
    Apr 4, 2004
Loading...

Share This Page