Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 30th, 2006, 06:58 AM
Authorized User
 
Join Date: Feb 2006
Location: , , India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to add vertical scroll bar and fixed heading

How can we add vertical scroll bar and fixed heading in gridview control ?? I tried to place gridview in a DIV and set fixed heading " TOP: expression(this.offsetParent.scrollTop); " .. but the heading width is wrapd out from out of the div and grid is stying in the div ... so there there is mismatching between gridview data and heading...

hope anyone can help me.

thanks for advance.
  #2 (permalink)  
Old November 15th, 2006, 10:43 AM
Registered User
 
Join Date: Nov 2006
Location: , , Netherlands.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you could use a panel control for the scrollbar:

<asp:Panel ID="Panel1" runat="server" Height="400px" Width="200px" ScrollBars="Vertical">
 <asp:GridView ....>
 </asp:GridView>
</asp:Panel>

for the fixed heading I only have this ugly solution:

 <style type="text/css">
 <!--
 table th
 {
   position: relative;
   top: expression(this.parentNode.parentNode.
                   parentNode.scrollTop-1);
 }
 -->
</style>

cheers, marco

  #3 (permalink)  
Old November 22nd, 2006, 09:31 AM
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have tried with multiple header which seems to be cutting off the few of header text.

Please check this out.


<style>

.test{
 position: relative;
   top: expression(this.parentNode.parentNode.
                   parentNode.scrollTop-1);
}
</style>
<div style="overflow:auto; height:150px;">


    <table width="1850" border="1" cellpadding="0" cellspacing="1">
      <tr class=test>
        <td colspan="2" bgcolor="#FFFFFF"><strong>1/05/06</strong></td>
        <td colspan="23" bgcolor="#FFFFFF"><strong>Work in Progress
          Schedule</strong></td>
        <td colspan="2" bgcolor="#FFFFFF"><strong>009-NE</strong></td>
      </tr>
      <tr class=test>
        <td width="100" rowspan="2" ><span> Status</span>&nbsp;
        </td>
        <td width="100" rowspan="2" bgcolor="#FFFFFF">Job #</td>
        <td width="250" rowspan="2" bgcolor="#FFFFFF">Client</td>
        <td colspan="3" bgcolor="#FFFFFF">Team</td>
        <td width="250" rowspan="2" bgcolor="#FFFFFF">Show Name</td>
        <td width="200" rowspan="2" bgcolor="#FFFFFF">City/
          Venue</td>
        <td width="200" rowspan="2" bgcolor="#FFFFFF">Booth
          Size</td>
        <td colspan="2" bgcolor="#FFFFFF">Show Dates</td>
        <td colspan="11" bgcolor="#FFFFFF">Project Scope</td>
        <td width="100" rowspan="2" bgcolor="#FFFFFF">Line of
          Business</td>
        <td width="50" rowspan="2" bgcolor="#FFFFFF">Project
          Type</td>
        <td width="50" rowspan="2" bgcolor="#FFFFFF">Ship Date</td>
        <td colspan="2" bgcolor="#FFFFFF">I&amp;D Schedule</td>
      </tr>
      <tr bgcolor="#FFFFFF"class=test>
        <td width="50">AE</td>
        <td width="50">AM</td>
        <td width="50">PM</td>
        <td width="50">Begin Show Date</td>
        <td width="50">End Show Date</td>
        <td width="20">EST</td>
        <td width="20">Design</td>
        <td width="20">CAD</td>
        <td width="20">GRAPH</td>
        <td width="20">FAB</td>
        <td width="20">WARE</td>
        <td width="20">SHIP</td>
        <td width="20">PORT</td>
        <td width="20">I&amp;O</td>
        <td width="20">Events</td>
        <td width="20">Trade Show</td>
        <td width="50">Setup Date</td>
        <td width="50">Dismantle Date</td>
      </tr>
      <tr>
        <td colspan="27" bgcolor="#FFFFFF" class="blueStrip">&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">
<input name="chkEst" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chkDesign" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chkCad" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chkGraph" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chkFab" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chkWare" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chkShip" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chkPort" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chkIno" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chk" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">
<input name="chk" type="checkbox" value="1"></td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
</tbody>
</table>
</div>



  #4 (permalink)  
Old May 24th, 2007, 01:46 AM
Registered User
 
Join Date: May 2006
Location: Ahmedabad, Gujarat, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maulik@hitechinfosoft.com Send a message via Yahoo to maulik@hitechinfosoft.com
Default



 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net 2.0 Gridview control vertical scroll bar kulkarnimonica ASP.NET 2.0 Professional 2 March 8th, 2010 08:14 AM
Add a Horizontal Scroll Bar to a List Box in VBA hewstone999 Access VBA 1 February 28th, 2008 08:31 AM
How to control scroll bar BurhanKhan Javascript 3 August 26th, 2004 02:31 PM
Scroll Bar cooldude87801 BOOK: Beginning Java 2 0 June 18th, 2003 11:59 AM



All times are GMT -4. The time now is 02:49 PM.


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