473,414 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

scrolling the datagrid

hey all,

how do i put the datagrid where it will scroll inside it's own
window(/container, not sure about the term)and not the page?

thanks,
rodchar
Nov 19 '05 #1
2 1250
You can put your DataGrid into a fixed size area by putting it in a
scrollable div such as this:

<div id="Layer1" style="position:relative;width:350px;height:200px; overflow:
scroll;">datagrid goes here</div>

The key is to use the "overflow" CSS attribute for your grid.Here's more
info:
http://www.w3schools.com/css/pr_pos_overflow.asp

Another option is to put your grid in an IFrame.
http://msdn.microsoft.com/workshop/a...cts/IFRAME.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
hey all,

how do i put the datagrid where it will scroll inside it's own
window(/container, not sure about the term)and not the page?

thanks,
rodchar

Nov 19 '05 #2
Steve,
In your example you specify the width to be 350px. Is there a way to tell
it to make its width the size of the browser window, in order to use as much
space as possible?
Thanks,
John

"Steve C. Orr [MVP, MCSD]" wrote:
You can put your DataGrid into a fixed size area by putting it in a
scrollable div such as this:

<div id="Layer1" style="position:relative;width:350px;height:200px; overflow:
scroll;">datagrid goes here</div>

The key is to use the "overflow" CSS attribute for your grid.Here's more
info:
http://www.w3schools.com/css/pr_pos_overflow.asp

Another option is to put your grid in an IFrame.
http://msdn.microsoft.com/workshop/a...cts/IFRAME.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
hey all,

how do i put the datagrid where it will scroll inside it's own
window(/container, not sure about the term)and not the page?

thanks,
rodchar


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Eyal | last post by:
Hello, i have a datafrid with more rows then can be seen in it,i know how to select the row with the 'currentRowIndex' but it doesnt move the row into the visible section ,can anyone help me with...
1
by: Arvind | last post by:
Hi I edit a cell in a DataGridView, and then would move to another cell in the DataGridView using mouse. Then the DataGridView as of now does scroll down to the last visited cell. But when I try...
3
by: Igor Mendizabal | last post by:
Hello, We're doing our own datagrid based on the System.windows.forms.datagrid control, and are having some problems with horizontal scrolling. In general, we construct our datagrid adding a...
1
by: john sutor | last post by:
Does anyone know if you can display vertical scroll or horizontal scroll bars on the datagrid ???
0
by: Tom | last post by:
I need to know how far my windows form data grid is scrolling horizontally. Ideally I would like to know how many pixels. I know there is a protected (at least) property in the datagrid called...
2
by: Paul | last post by:
Hi I have a page broken into two sections, the first top section is selection criteria for my datagrid. The second section is the actual datagrid. I would like the selection criteria section...
1
by: John Bayly via .NET 247 | last post by:
I'm working on an inherited Datagrid class that includes afunction called onMouseMove to paint the row under the cursor tomake reading easier for users. To paint the row, the function sets the...
0
by: Dan Hinsley | last post by:
I just got one of the new Microsoft Mice that has a "tilt wheel" for horizontal scrolling. This works in a listbox in my VB.NET app, but doesn't work for a datagrid that does have a horizontal...
2
by: Eduard | last post by:
I have a ASP.Net datagrid wrap in the following div: <DIV id="divPart2" style="OVERFLOW: hidden">. Another div controls the horizontal scrolling: <DIV id="scroll1" style="OVERFLOW: scroll;...
3
by: Brian Tkatch | last post by:
I have a form with two DataGrids, which are kept in sync manually via Stored PROCEDURE calls. That is, when a record is selected on the first grid, a stored PROCEDURE is CALLed to Fill() the next...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.