Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scoll bars on datagrid 1

Status
Not open for further replies.

Zarcom

Programmer
May 7, 2002
1,275
CA
Hey guys does anyone know how to put scroll bars on a datagrid? I tried paging but, everyone in the office seems to think that is too bloody complicated.. That no one will understand that they have to click next > to get the next 10 lines!
Anyway, if anyone knows how to put scrollies on then I am set.
Thanks That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Oh, I read this very nice thing yesterday about how to do that with a scrolling <div>... very nice.

Here ya go:
Code:
<div style=&quot;180px;overflow=auto&quot;>
  <asp:datagrid ......

  </asp:datagrid>
</div>
The datagrid, itself, scrolls. No frames, no nothing. This setting makes the default grid 180px high, and anything taller scrolls. Makes the web app feel more like client/server.

:)
paul
penny1.gif
penny1.gif
 
Thanks Paul!

I did have to change that a bit for anyone who looks at this.

<div style=&quot;OVERFLOW: auto; HEIGHT: 200px&quot;>
<asp:datagrid ......

</asp:datagrid>
</div>
That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Ooooooo...very nice indeed!

I havn't tested it yet, but I'm guessing that this could be used with other controls as well, right?

i.e.
You have a checkbox list, but you want it in a scrollbox instead of having hte user scroll the length of the page.

Interesting if the theory is correct...

D
 
Theorectically your theory is correct!

I haven't tried exactly that but from what I now understand Ja! Goot to go That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top