I need a way to detect when a user mouses up and down on a datagrid's
vertical scrollbar. However, the 'mouse down' and 'mouse up' events of the
datagrid do not fire when the scrollbar is clicked, and there are no
built-in 'scroll' events at all.
So how can this be accomplished?
Thanks!
foreach ( Control c in dataGrid1.Controls )
{
Type t = c.GetType();
if ( typeof( System.Windows.Forms.HScrollBar ).IsAssignableFrom( t
) ||
typeof( System.Windows.Forms.VScrollBar ).IsAssignableFrom( t ) )
{
ScrollBar csb = (ScrollBar)c;
csb.ValueChanged +=new EventHandler(csb_ValueChanged);
}
}
Hope this helps,
Cheers,
Arun.
"Arun" <arunkuma...@gmail.com> wrote in message
news:1128309546.7...@g49g2000cwa.googlegroups.com...