473,406 Members | 2,956 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,406 software developers and data experts.

scrolling datagrid

how can I keep track of the first visble line in my datagrid when I drag the
vertical scrollbar up or down?

To clairfy my need...
An example:

I wish to set CurrentRowIndex to be the first visible row in my datagrid
while I drag the vertical scrollbar.

Should I combine an MouseDown event with a scroll event?

Appreciate any help and code axamples in advance.
---
Hans
Nov 16 '05 #1
3 5295
Hans,

The data grid doesn't support this. If anything, I would have another
data grid positioned beneath the top one, and have the top row remain fixed.
Either that, or I would work the values into the header row somehow, so that
it is always visible.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Hans [DiaGraphIT]" <Ha************@discussions.microsoft.com> wrote in
message news:7C**********************************@microsof t.com...
how can I keep track of the first visble line in my datagrid when I drag
the
vertical scrollbar up or down?

To clairfy my need...
An example:

I wish to set CurrentRowIndex to be the first visible row in my datagrid
while I drag the vertical scrollbar.

Should I combine an MouseDown event with a scroll event?

Appreciate any help and code axamples in advance.
---
Hans

Nov 16 '05 #2
Hi Nicholas!

Thank you for your answer. It wasn't what I was hoping for:-(.

My problem what I'm trying to solve is...:
I have an array of images ( inside a panel besides the datagrid). These
images is depending on what is is visible in the datagrid, from first visible
to last visible row. To solve this I use a scroll event on cellchange and
keep track on Currentrowindex. The problem begins when an user starts to use
the scrollbar. I've tried to disable the scrollbar, with the result that the
hole datagrid is disabled. The user have then no possibility to traverse the
grid.

Hope you understood my problem. How can I solve this? Please help, I'm soon
desperate....

...... is there a way to import my image-array into the grid itself? ... and
if so... how?

---
Hans

"Nicholas Paldino [.NET/C# MVP]" wrote:
Hans,

The data grid doesn't support this. If anything, I would have another
data grid positioned beneath the top one, and have the top row remain fixed.
Either that, or I would work the values into the header row somehow, so that
it is always visible.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Hans [DiaGraphIT]" <Ha************@discussions.microsoft.com> wrote in
message news:7C**********************************@microsof t.com...
how can I keep track of the first visble line in my datagrid when I drag
the
vertical scrollbar up or down?

To clairfy my need...
An example:

I wish to set CurrentRowIndex to be the first visible row in my datagrid
while I drag the vertical scrollbar.

Should I combine an MouseDown event with a scroll event?

Appreciate any help and code axamples in advance.
---
Hans


Nov 16 '05 #3
Can't help with your stated problem, but I would warn you about using
CurrentRowIndex. I would suggest using CurrentCell.RowIndex, since it is
correct more often than CurrentRowIndex (which in some cases does not update
as expected).

Steve

"Hans [DiaGraphIT]" wrote:
how can I keep track of the first visble line in my datagrid when I drag the
vertical scrollbar up or down?

To clairfy my need...
An example:

I wish to set CurrentRowIndex to be the first visible row in my datagrid
while I drag the vertical scrollbar.

Should I combine an MouseDown event with a scroll event?

Appreciate any help and code axamples in advance.
---
Hans

Nov 16 '05 #4

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...

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.