How to use a scrollbar in a custom control

T

ton

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
 
M

Marshal Antony

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top