473,497 Members | 2,051 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid scrolling

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 how to make the selected row come
into display in the datagrid visible rows (scrolling).
thank u
Eyal
Nov 22 '05 #1
1 1470
http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q895q
5.59 How do I programmatically scroll the datagrid to a particular
row?

The DataGrid has a protected GridVScrolled member that can be used to
scroll the grid. To use it, you can derive from DataGrid and add a
ScrollToRow method. Here is a code snippet.

Public Class MyDataGrid

Inherits DataGrid

Sub ScrollToRow(ByVal row As Integer)

If Not Me.DataSource Is Nothing Then

Me.GridVScrolled(Me, New
ScrollEventArgs(ScrollEventType.LargeIncrement, row))

End If

End Sub

End Class
This solution uses information provided by Daniel Herling (MS) in the
microsoft.public.dotnet.framework.windowsforms.dat abinding newsgroup.
--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Eyal" <li******@yahoo.com> schreef in bericht
news:02****************************@phx.gbl...
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 how to make the selected row come
into display in the datagrid visible rows (scrolling).
thank u
Eyal





Nov 22 '05 #2

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

Similar topics

3
1863
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...
0
1647
by: Frnak McKenney | last post by:
I have a (small) multi-table database application which allows edits, print reports, and has two scrolling screen displays which show information merged from multiple tables. I'm having trouble...
1
4971
by: john sutor | last post by:
Does anyone know if you can display vertical scroll or horizontal scroll bars on the datagrid ???
0
1174
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...
1
5279
by: Craig Banks | last post by:
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is display a row of data over several datagrid rows so...
8
2393
by: pmud | last post by:
Hi, I have 2 questions: 1. I have an editable data grid with 21 columns. I need to edit only 2 cloumns in this data grid. But when the grid is displayed in Edit mode, all the columns show long...
1
2319
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
1406
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...
3
2694
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...
1
1872
by: Brock | last post by:
First note that I am using Framework 1.1. I have an .aspx page that is displaying a list of employees, but only the Employee Number, First Name, Last Name, and Title. It is working great. I...
0
7121
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
6993
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
7197
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
7375
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
5456
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,...
1
4899
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
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.