Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » ASP 3.0




 Page 1 of 1 [ 5 posts ] 



Author Message
 Post subject: Scroll Bar in the ASP.NET
 Post Posted: Sun Nov 22, 2009 2:45 pm 
Offline

Joined: Sat Feb 21, 2009 11:23 am
Posts: 40
Hi All, I m developing an app usin the visual studio 2008 wid the c#.

I would like to create a datagrid in the ASP .NET pages whose data was
very larger. I dun want to include the paging 2 my datagrid however the
records bein returned were so many dat one reaaly ned to scroll a lot in
the browser.

how 2 put a scrollbar 4 my datagrid?

Suggest me code.


Thanks In Advance


Top 
 Post subject: Re: Scroll Bar in the ASP.NET
 Post Posted: Sun Nov 22, 2009 2:46 pm 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
Hi,

Code:
<asp:Panel ID="Panel1" runat="server" ScrollBars="Both" Height="300" Width="100%">
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</asp:Panel>

more info

Code:
http://www.beansoftware.com/ASP.NET-FAQ/GridView-ScrollBars.aspx

http://www.aspnettutorials.com/tutorials/controls/gridviewscroll-aspnet2-csharp.aspx

http://www.victorchen.info/a-scrollable-gridview-with-a-fixed-header-in-c/

good luck


Top 
 Post subject: Re: Scroll Bar in the ASP.NET
 Post Posted: Sun Nov 22, 2009 2:46 pm 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
Hi,

if talikng about GridView..

http://bytes.com/topic/net/answers/5783 ... r-gridview

http://www.codeproject.com/KB/aspnet/AjaxScroll.aspx


Top 
 Post subject: Re: Scroll Bar in the ASP.NET
 Post Posted: Sun Nov 22, 2009 2:46 pm 
Offline

Joined: Sat Feb 21, 2009 10:48 am
Posts: 9
hi you can use panel to encapsulate the grid

refer below code :
Code:
<asp:Panel ID="Panel1" ScrollBars="Vertical" Width="100%" runat="server">
  <asp:GridView ID="GridView1" runat="server" OnRowEditing="GridView1_RowEditing" DataKeyNames="duration,nextrun"
   AutoGenerateColumns="False" AllowPaging="false
   Width="20%"  ShowFooter="false" OnRowCancelingEdit="GridView1_RowCancelingEdit"
   OnRowDataBound="GridView1_RowDataBound" OnRowUpdating="GridView1_RowUpdating" OnRowCommand="GridView1_RowCommand">
   <Columns>
    <asp:BoundField DataField="jobname" HeaderText="jobname" />
    <asp:BoundField DataField="enabled" HeaderText="enabled" />
    <asp:BoundField DataField="lastrun" HeaderText="lastrun" />
       </asp:GridView>
</asp:Panel>


Top 
 Post subject: Re: Scroll Bar in the ASP.NET
 Post Posted: Sun Nov 22, 2009 2:46 pm 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
You have two choice

Code:
1) use <div> tag

<div style="width: 190px; height: 190px; overflow: auto; padding: 5px">

---------------gridview control---------

</div>

2) used Panel control with ScrollBars property

<asp:Panel ID="Panel1" ScrollBars="Both" runat="server">

----GridView Control with fixed length------------


  </asp:Panel>



Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 5 posts ] 




Board index » Server Side Development » ASP 3.0


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron