Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 6th, 2003, 09:06 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default scrollble datagrid with fixed headers


Hi

I want to create scrollble datagrid with fixed headeres.

I am using div tag like this

<div style="vertical-align top; height: 300px; overflow:auto;">
and set the ShowHeader =False.Above the div tag using table diplaying the headers. everything working fine for one datagrid.
but the problem is my page contains multiple datagrids.If i use separate <div> tag for each datagrid its not displaying properly.
how to use individual div tag for each datagrid? pl advice me

thanks

 
Old October 7th, 2003, 08:14 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Can you post some code so we may see where the problem lies?

Your HTML should look something like this...

<table>
    Stuff for column headers here...
</table>
<div ...>
    <asp:Datagrid ...>
    </asp:Datagrid>
</div>

<table>
    Stuff for column headers here...
</table>
<div ...>
    <asp:Datagrid ...>
    </asp:Datagrid>
</div>


Peter
 
Old October 9th, 2003, 04:02 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes doing same this its displaying some space(height of datagrid1) then displaying datagrid2.in my page based on condition i am showing the datagrids.example cnt=1 showing datagrid1 only if cnt=2 showing datagrid2 only.
like this based on cnt showing only one grid at a time.
if i show grid2 its displaying some space(height of grdi1) then grid2

i hope you got my problem.pl clear me

 
Old October 9th, 2003, 09:35 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Maybe you should put the header table in twice and turn off both the grid and header table for each grid instead of relying on a single header table for both grids.

The only explanation that I can come up with for there being space between the header and the second data grid is that there is additional HTML between them. otherwise, they should lie on the page right next to each other.

Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagrid fixed header Swopna .NET Framework 1.x 1 March 22nd, 2008 11:06 AM
Headers in a Scrollable Datagrid Dilip Nagle ASP.NET 1.0 and 1.1 Basics 0 March 20th, 2005 12:11 AM
Fixed row in datagrid JCP General .NET 1 January 13th, 2005 05:56 PM
.NET DataGrid Column Headers ashley_y General .NET 1 October 25th, 2004 03:00 PM
A fixed size Datagrid pbyrum General .NET 1 July 30th, 2004 09:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.