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

Scrolling in a DataGrid

Hello,
I am having a problem with my datagrid after I load it, the information
is longer than one page, so you scroll down to find the information you
want double click it and it pulls up a blank cell. The code is:
Dim x As Integer

For x = 0 To dgrSearchResults.VisibleRowCount - 1 Step 1
If dgrSearchResults.IsSelected(x) Then
CompoundSel = dgrSearchResults(x, 0)
End If
Next

If I don't have to scroll down it works.
Any ideas of what is going on

Tom

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
1 955
Hi,

This will check all the rows not just the visible ones.

Dim cm As CurrencyManager

cm = CType(Me.BindingContext(dgrSearchResults.DataSourc e), CurrencyManager)
For x = 0 To cm.count- 1 Step 1
If dgrSearchResults.IsSelected(x) Then
CompoundSel = dgrSearchResults(x, 0)
End If
Next

Ken
-------------------
"Thomas Beyerlein" <tb***@yahoo.com> wrote in message
news:eW**************@TK2MSFTNGP10.phx.gbl...
Hello,
I am having a problem with my datagrid after I load it, the information
is longer than one page, so you scroll down to find the information you
want double click it and it pulls up a blank cell. The code is:
Dim x As Integer

For x = 0 To dgrSearchResults.VisibleRowCount - 1 Step 1
If dgrSearchResults.IsSelected(x) Then
CompoundSel = dgrSearchResults(x, 0)
End If
Next

If I don't have to scroll down it works.
Any ideas of what is going on

Tom

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #2

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
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
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,...

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.