We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

windows datagrid scrooling

how can i cath windows datagrid's horizontal or vertical scrooling events?

1 Reply

CB Clay Burch Syncfusion Team September 17, 2002 06:21 PM

You can catch the DataGrid.Scroll event and then use GetChildAtPoint to identify which scrolbar it is.
private void dataGrid1_Scroll(object sender, System.EventArgs e)
{
	object o = this.dataGrid1.GetChildAtPoint(this.dataGrid1.PointToClient(Control.MousePosition));
	VScrollBar vScroll = o  as VScrollBar;
	if(vScroll != null)
		Console.WriteLine("VScroll");
	else
		Console.WriteLine("HScroll");
}

Loader.
Live Chat Icon For mobile
Up arrow icon