.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Get scroll value after mouse wheel on datagrid

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Windows Application


How can I get scroll value after mouse wheel on datagrid?
I need this for synchronize 2 datagrid scrolling action.


The .NET programmer

View Complete Post

More Related Resource Links

Why is the scrolling with a scroll wheel on a mouse so choppy in VS.NET 2010?

I have a Microsoft Mouse that contains a scroll wheel used for scrolling the vertical scroll bars in applications. IE, Word, Outlook, Safari, you name it have smooth consistent scrolling when using the wheel.  However in VS.NET 2010 it is real choppy, like the scroll bar moves in steps or increments. Is there a configuration specific to VS.NET 2010 for configuring this?

datagriview scroll - using mouse wheel


I know the option to scroll down the dgv using the mouse-wheel is associated with the scroll bars.

i had to disable the scroll bars but would still like to enable the use of the mouse wheel to scroll down the grid.

i have no idea how, nor i have seen an event for the mouse wheel.

any help would be appreciated


How to highlight datagrid or GridView row on mouse over?

This article will show how you can Ajax with GridView to display popup messages when mouse moves over certain column. In the demo project I have added first column as an image column with a help icon in it. This kind of implements a feature that if you want more information about the row you can move mouse over this icon, a asynchronous request is sent to server for data about that row and when call returns the returned message is show as a popup message.

How to scroll the DataGrid (horizontally) when user drags a column header far left or right?

We're working with the WPF DataGrid and I have a question about  dragging column headers: The grid lets the user rearrange the columns, by dragging the column header left or right.  So far, so good. But, sometimes we have many columns, and only the first few columns are visible; so there is a horizontal scrollbar.  In such case, if the user drags a column header to the right edge of the DataGrid window, I want the DataGrid to scroll, automatically, one column at a time.  Is there an easy way to do that? (To be clear: yes, the user can already scroll horizontally by interacting with the horizontal scrollbar, but that isn't what I'm asking about.  I'm asking if the "drag a column header left or right" gesture can cause the DataGrid to scroll left or right.) I guess I could handle various low-level events, but it seems like it shouldn't be necessary -- DataGrid has so much functionality built-in, that I'm guessing it already has the ability to scroll when the user drags the column header to the edge.  So, is there either (a) a property that I can set, to tell the DataGrid to scroll when the user drags a column header to the edge of the window;  or (b) a code example showing how to achieve this effect myself?  Thanks!

Making a scrollable panel scroll with mousewheel just by hovering mouse

Hi, I have a particular problem with a possible solution and I am interested in hearing peoples opinions if it is the right way to go about it (or not  ) Some applications I have come across, such as Firefox, will allow the user to scroll the document window just by hovering the mouse over the display area and using the mouse wheel. You don't have to focus / select the display area first. With Firefox, the address bar can have the focus and the keyboard input but you can still scroll the document. Contrasting with IE and Visual Studio, you have to click into the document area before it responds to mouse wheel messages. In my winforms app, I have a tab control with several scrollable tabpages as well as scrollable panels in other places. Some of these just display data and don't have controls that can be focused or tabbed into. I would like to emulate the firefox behaviour described above. What I have done is created a class, ScrollPanelMessageFilter, that implementes System.Windows.Forms.IMessageFilter and that takes a Panel as it constructor parameter. It detects the mouse wheel when the cursor is over the display area and sends the message to the panel: using System;using System.Collections.Generic;using System.Diagnostics;using System.Drawing;using System.Text;using System.Runtime.InteropServices;using System.Windows.Forms;namespace MouseWheelTest{   

Seadragon mouse wheel motion zoom/zoomout not working

using following code.. vs 2008 andajaxtoolkit 3.5.40412.2what is is to be done to make it work? <form id="form1" runat="server"> <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </ajaxToolkit:ToolkitScriptManager> <ajaxToolkit:Seadragon ID="Seadragon2" Height="500px" Width="500px" runat="server" SourceUrl="dzc_output.xml" MouseNavEnabled="true" > </ajaxToolkit:Seadragon> </form>

Datagrid + Mouse right click event


I have a datagrid and it contains the list of files from the folder. I want to display the default window files right click options in right click on the filename.

That is when ever i right click the filename in the datagrid, a default windows right click pop up should appear.


Can anyone help me to sort this out. The project is in C#.

Thank you.

Saugat K.C.

Selecting Datagrid Row when Right mouse button is Pressed.


How can i select the datagrid row when i click the right mouse button. I need to show the context menu in the datagrid but i am able to generate the context menu but selected row i not changing.

How can i solve this issue.


Saugat K.C.

Disable Mouse Right click in datagrid


Hi Friends,

       Can any one Suggest,how to disable mouse right click in WPF Datagrid.


Thanks in Advance,


datagrid with adjusting Vertical scroll bar



here my requirement is datagrid scrollbar which is smaller than the datagrid height...

I need little scrollbar at top vertical possition...

Can u help in this....

Mouse scroll up and down event is not triggered on picturebox.


I have a picture box in my form and now I want to add an event so that if the mouse is scrolled up the scale of the picture box gets larger and when the user

scrolls down the size off the picture box gets smaller. This way I want to make a zoom in and out effect.

So now i have the following code in the mouse wheel event of the Picture box:






End If


But somehow this whole mouse wheel event isn't fired. Does anybody know what might be the problem here?


How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Use Jquery with repeater, gridview, datagrid

Before we talk about jquery inside any itemtemplate (repeater, gridview, datagrid), we need to understand the basic use of jquery functions

ListBox tricky to set in a DataGrid/GridView

Listboxes are very tricky to set selected items in grid - there is no real nice way to do it. It would have been great if Microsoft included a property that accepts an array or comma separated values - or anything! But they only allow each item in the list to be selected individually. The way to do this in a grid is a bit messy, but it is fairly simple to implement. When a row is created (as per the event), select the items of the listbox as per the datagrid source data:

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

Using the WPF Toolkit DataGrid

WPF comes with a large number of built in controls, but from the beginning it has lacked something that many application developers find extremely important - a DataGrid. You can use the ListView to create something approximating a DataGrid

A datagrid control that can be personalized... anyone??


Hello all,

I need a datagrid control that has following features, besides other regular stuff like paging, sorting, filtering, etc:

The user should be able to -

1. Select columns to view

2. Select column Sequence

3. Select default sort column

4. Store the setting (as a view) and use it on next visit.

5. llow multiple such views to be stored for a user for future use.

All these settings should be saved and when the user comes back he gets the same settings.

Really appreciate your time and would love to get any ideas.


- Zen

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend