473,480 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DataGrid Scroll

I need to use the keyboard to scroll up/down my dtagrid.

I need to map the

1. up/down arrow keys to move up/down one recored at a time
2. Page Up/Down keys to move up/down one page at a time
3. CTRL+End and CTRL+Home keys to move to end and beginning(last
record and first record) of the datagrid respectively

code for page down:

public bool PreFilterMessage(ref Message m)
{

Keys keyCode = (Keys)(int)m.WParam & Keys.KeyCode;

if(m.Msg == WM_KEYDOWN && keyCode == Keys.PageDown)
{
int position = 500;

PostMessage (this.dataGrid1.Handle,WM_VSCROLL ,SB_THUMBPOSITION +
0x10000 * position,0);

return true;
}

Nothing is happening, does any one have any sample code to handle the
above mentioned events(1,2,3).

Thanks
Nov 16 '05 #1
0 1085

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

Similar topics

4
5894
by: Bill Sonia | last post by:
It seems whenever I set a DataGrid.DataSource = DataTable (vb.net) to populate a datagrid, the scroll bars on the datagrid default to disabled. And the only way I can get them to enable is to...
1
4970
by: john sutor | last post by:
Does anyone know if you can display vertical scroll or horizontal scroll bars on the datagrid ???
1
1707
by: RA | last post by:
Hi I wonder if anyone tried this or know if it has been fixed. I am using vs .net 1.1 and have a windows form. In the form I have a DataGrid with the following format: 3 first Columns are of...
1
1878
by: Gidi | last post by:
hello i have a DataGrid table and by the help of Adnan, here in the forum, i have the Mouse_up Event that by Clicking a row on the dataGrid it's selectes the whole ro the problem is when i'm...
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...
6
2727
by: Agnes | last post by:
I understand it is impossible, but still curious to know "Can I freeze several column in the datagrid, the user can only scroll the first 3 columns (not verical), for the rest of the coulumn, it is...
2
2765
by: Grant Smith | last post by:
I am currently trying to expand upon the default datagrid control using VB.NET. I have noticed one quirk about it that I cna't seem to get around. If I have a datagrid that doesn't display all of...
0
1044
by: Grant Smith | last post by:
I've been creating my own datagrid control which I'm inheiriting from the standard datagrid control and I have come across two very interesting behaviors with the datagrid control. 1. If you...
0
1501
by: Greg | last post by:
I've made a datagrid multiline (for anyone interested, I used an adaptation of the code at http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp). This has introduced a very serious issue: the vertical...
3
2693
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
6908
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
7081
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
6921
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
5336
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
4481
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...
0
2995
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
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
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
563
muto222
php
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.